/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * com_distri_articulos_almacen.java
 *
 * Created on 17/02/2011, 04:20:20 PM
 */

package sie_invdis;
import java.sql.*;
import javax.swing.*;


import javax.swing.JOptionPane;
import javax.swing.JTable;
import javax.swing.JTable.*;
import java.awt.*;
import java.awt.event.*;
import java.util.Date;
import java.util.Calendar;
import java.text.SimpleDateFormat;
import java.text.ParseException;
import java.text.*;
import java.io.*;
import javax.swing.table.DefaultTableCellRenderer;
/**
 *
 * @author Michelle
 */
public class com_distri_articulos_almacen extends javax.swing.JFrame {

    private javax.swing.table.DefaultTableModel jtable_modelo;
    private javax.swing.table.DefaultTableModel jtable_modelo_proveedorexistencia;
    private javax.swing.table.DefaultTableModel jtable_modelo_familiarexistencia;
    private javax.swing.table.DefaultTableModel jtable_modelo_almacen;
    private javax.swing.table.DefaultTableModel jtable_modelo_entradaalma;
    private javax.swing.table.DefaultTableModel jtable_modelo_entradaalmadetalle;
    private javax.swing.table.DefaultTableModel jtable_modelo_detallealma;
    private javax.swing.table.DefaultTableModel jtable_modelo_detallealmab;
    private javax.swing.table.DefaultTableModel jtable_modelo_alm_update;
    private javax.swing.table.DefaultTableModel jtable_modelo_alm_updatereplace;
    private javax.swing.table.DefaultTableModel jtable_modelo_detallealmaayb;
    private javax.swing.table.DefaultTableModel jtable_modelo_detallealmaaybv;

    private DefaultListModel modelo ;
    DefaultTableCellRenderer alinearCentro, alinearderecha, alinearIzquierda;
    private  String textohtml="";
    private SimpleDateFormat formateador = new SimpleDateFormat("dd-MM-yyyy");
    private SimpleDateFormat formateadoresta = new SimpleDateFormat("yyyy-MM-dd");
    
    private int buscamp=0,indexactual=0,opbuscamp=0,yacarguecat=0,yacarguefotos=0,ordenamiento=2,campupdate=2,buscampv=2;
    
    bd_conexion x = new bd_conexion() ;
    ResultSet rs = null;

    /** Creates new form com_distri_articulos_almacen */
    public com_distri_articulos_almacen() {
        this.iniciar_modelo_de_tabla();
        this.iniciar_modelo_proveedorexistencias();
        this.iniciar_modelo_familiaexistencias();
        this.iniciar_modelo_de_tabla_almacen();
        this.iniciar_modelo_entradasalmacen();
        this.iniciar_modelo_entradasalmacendetalle();
        this.iniciar_modelo_almacenes();
        this.iniciar_modelo_detallealma();
        this.iniciar_modelo_de_tablaalmacenupdate();
        this.iniciar_modelo_de_tablaalmacenupdatereplace();
        this.iniciar_modelo_detallealmabod();
        this.iniciar_modelo_detallealmaayb();
        this.iniciar_modelo_detallealmaaybvi();
        this.setLocation(25,25);
        initComponents();
        if(JOptionPane.showConfirmDialog(null, "Desea Cargar Datos?")==0)
            {
                this.carga_datos_catalogoarticulos(buscamp,opbuscamp,"",1);
                this.carga_datos_existxfamilia();
                this.carga_datos_existxproveedor();
            }


        buscamp=1;
        opbuscamp=1;

       // x.estableceConexion();

    this.buttonGroup1.setSelected(jrb_bclave.getModel(), true);
    this.buttonGroup2.setSelected(jrb_obexacto.getModel(), true);
    this.buttonGroup3.setSelected(jrbtn_tiendaclave.getModel(), true);
    this.buttonGroup5.setSelected(jrbtn_aybvigencia1.getModel(), true);

    this.jtf_busqueda.requestFocus();


    jtb_almacen_catalogo.getColumnModel().getColumn(0).setPreferredWidth(60);//familia
    jtb_almacen_catalogo.getColumnModel().getColumn(1).setPreferredWidth(60);//subfam.
    jtb_almacen_catalogo.getColumnModel().getColumn(2).setPreferredWidth(45);//clave
    jtb_almacen_catalogo.getColumnModel().getColumn(3).setPreferredWidth(80);//descrip.
    jtb_almacen_catalogo.getColumnModel().getColumn(4).setPreferredWidth(45);//item
    jtb_almacen_catalogo.getColumnModel().getColumn(5).setPreferredWidth(45);//item
    jtb_almacen_catalogo.getColumnModel().getColumn(6).setPreferredWidth(15);//precio
    jtb_almacen_catalogo.getColumnModel().getColumn(7).setPreferredWidth(15);//precio
    jtb_almacen_catalogo.getColumnModel().getColumn(8).setPreferredWidth(30);//f.ult. compra
    jtb_almacen_catalogo.getColumnModel().getColumn(9).setPreferredWidth(15);//precio
    jtb_almacen_catalogo.getColumnModel().getColumn(10).setPreferredWidth(20);//Observaciones

    jtb_almacen_catalogo.getTableHeader().setBackground(Color.yellow);
    jtb_almacen_catalogo.requestFocus();

    jtb_almacen_proveedor.getColumnModel().getColumn(0).setPreferredWidth(120);//familia
    jtb_almacen_proveedor.getColumnModel().getColumn(1).setPreferredWidth(40);//subfam.
    jtb_almacen_proveedor.getColumnModel().getColumn(2).setPreferredWidth(40);//clave
    jtb_almacen_proveedor.getColumnModel().getColumn(3).setPreferredWidth(40);//descrip.

    jtb_almacen_proveedor.getTableHeader().setBackground(Color.yellow);
    jtb_almacen_proveedor.requestFocus();

    jtb_almacen_familias.getColumnModel().getColumn(0).setPreferredWidth(120);//familia
    jtb_almacen_familias.getColumnModel().getColumn(1).setPreferredWidth(40);//subfam.
    jtb_almacen_familias.getColumnModel().getColumn(2).setPreferredWidth(40);//clave
    jtb_almacen_familias.getColumnModel().getColumn(3).setPreferredWidth(40);//descrip.

    jtb_almacen_familias.getTableHeader().setBackground(Color.yellow);

    jtb_almacen_control.getColumnModel().getColumn(0).setPreferredWidth(60);//familia
    jtb_almacen_control.getColumnModel().getColumn(1).setPreferredWidth(60);//subfam.
    jtb_almacen_control.getColumnModel().getColumn(2).setPreferredWidth(45);//clave
    jtb_almacen_control.getColumnModel().getColumn(3).setPreferredWidth(80);//descrip.
    jtb_almacen_control.getColumnModel().getColumn(4).setPreferredWidth(45);//item
    jtb_almacen_control.getColumnModel().getColumn(5).setPreferredWidth(45);//item
    jtb_almacen_control.getColumnModel().getColumn(6).setPreferredWidth(15);//precio
    jtb_almacen_control.getColumnModel().getColumn(7).setPreferredWidth(15);//precio
    jtb_almacen_control.getColumnModel().getColumn(8).setPreferredWidth(30);//f.ult. compra
    jtb_almacen_control.getColumnModel().getColumn(9).setPreferredWidth(15);//precio
    jtb_almacen_control.getColumnModel().getColumn(10).setPreferredWidth(20);//Observaciones

    jbt_catalogoalmacen.getColumnModel().getColumn(0).setPreferredWidth(120);//familia
    jbt_catalogoalmacen.getColumnModel().getColumn(1).setPreferredWidth(30);//subfam.
    jbt_catalogoalmacen.getColumnModel().getColumn(2).setPreferredWidth(30);//clave
    jbt_catalogoalmacen.getColumnModel().getColumn(3).setPreferredWidth(180);//descrip.
    jbt_catalogoalmacen.getColumnModel().getColumn(4).setPreferredWidth(60);//item
    jbt_catalogoalmacen.getColumnModel().getColumn(5).setPreferredWidth(40);//item
    jbt_catalogoalmacen.getColumnModel().getColumn(6).setPreferredWidth(40);//precio
    jbt_catalogoalmacen.getColumnModel().getColumn(7).setPreferredWidth(40);//precio
    jbt_catalogoalmacen.getColumnModel().getColumn(8).setPreferredWidth(30);//f.ult. compra
    jbt_catalogoalmacen.getColumnModel().getColumn(9).setPreferredWidth(30);//precio
    jbt_catalogoalmacen.getColumnModel().getColumn(10).setPreferredWidth(120);//Observaciones

    jbt_catalogoalmacendetalle.getColumnModel().getColumn(0).setPreferredWidth(30);//familia
    jbt_catalogoalmacendetalle.getColumnModel().getColumn(1).setPreferredWidth(70);//subfam.
    jbt_catalogoalmacendetalle.getColumnModel().getColumn(2).setPreferredWidth(180);//clave
    jbt_catalogoalmacendetalle.getColumnModel().getColumn(3).setPreferredWidth(60);//descrip.
    jbt_catalogoalmacendetalle.getColumnModel().getColumn(4).setPreferredWidth(30);//item
    jbt_catalogoalmacendetalle.getColumnModel().getColumn(5).setPreferredWidth(30);//item
    jbt_catalogoalmacendetalle.getColumnModel().getColumn(6).setPreferredWidth(30);//precio
    jbt_catalogoalmacendetalle.getColumnModel().getColumn(7).setPreferredWidth(30);//precio
    jbt_catalogoalmacendetalle.getColumnModel().getColumn(8).setPreferredWidth(120);//precio

    jtb_almacen_actualiza.getColumnModel().getColumn(0).setPreferredWidth(60);//familia
    jtb_almacen_actualiza.getColumnModel().getColumn(1).setPreferredWidth(60);//subfam.
    jtb_almacen_actualiza.getColumnModel().getColumn(2).setPreferredWidth(45);//clave
    jtb_almacen_actualiza.getColumnModel().getColumn(3).setPreferredWidth(80);//descrip.
    jtb_almacen_actualiza.getColumnModel().getColumn(4).setPreferredWidth(45);//item
    jtb_almacen_actualiza.getColumnModel().getColumn(5).setPreferredWidth(45);//item
    jtb_almacen_actualiza.getColumnModel().getColumn(6).setPreferredWidth(15);//precio
    jtb_almacen_actualiza.getColumnModel().getColumn(7).setPreferredWidth(15);//precio
    jtb_almacen_actualiza.getColumnModel().getColumn(8).setPreferredWidth(30);//f.ult. compra
    jtb_almacen_actualiza.getColumnModel().getColumn(9).setPreferredWidth(15);//precio
    jtb_almacen_actualiza.getColumnModel().getColumn(10).setPreferredWidth(20);//Observaciones

    jtb_almacen_replace.getColumnModel().getColumn(0).setPreferredWidth(60);//familia
    jtb_almacen_replace.getColumnModel().getColumn(1).setPreferredWidth(60);//subfam.
    jtb_almacen_replace.getColumnModel().getColumn(2).setPreferredWidth(45);//clave
    jtb_almacen_replace.getColumnModel().getColumn(3).setPreferredWidth(80);//descrip.
    jtb_almacen_replace.getColumnModel().getColumn(4).setPreferredWidth(45);//item
    jtb_almacen_replace.getColumnModel().getColumn(5).setPreferredWidth(45);//item
    jtb_almacen_replace.getColumnModel().getColumn(6).setPreferredWidth(15);//precio
    jtb_almacen_replace.getColumnModel().getColumn(7).setPreferredWidth(15);//precio
    jtb_almacen_replace.getColumnModel().getColumn(8).setPreferredWidth(30);//f.ult. compra
    jtb_almacen_replace.getColumnModel().getColumn(9).setPreferredWidth(15);//precio
    jtb_almacen_replace.getColumnModel().getColumn(10).setPreferredWidth(20);//Observaciones

   
    this.jtf_busqueda.requestFocus();

    }

private void iniciar_modelo_de_tabla()
    {
        jtable_modelo=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo.addColumn("Familia");
        jtable_modelo.addColumn("Sub_fam.");
        jtable_modelo.addColumn("Clave");
        jtable_modelo.addColumn("Descripcion.");
        jtable_modelo.addColumn("Codigo");
        jtable_modelo.addColumn("Item.");
        jtable_modelo.addColumn("Costo");
        jtable_modelo.addColumn("Precio");
        jtable_modelo.addColumn("F. Ult. Compra");
        jtable_modelo.addColumn("Existencia");
        jtable_modelo.addColumn("Observaciones");
       //se crea intancia de la clase conexion

}
public void centrar_datos()
    {
        alinearderecha = new DefaultTableCellRenderer();
        alinearderecha.setHorizontalAlignment(SwingConstants.RIGHT);

        jbt_catalogoalmacen.getColumnModel().getColumn(8).setCellRenderer(alinearderecha);
        jbt_catalogoalmacen.getColumnModel().getColumn(9).setCellRenderer(alinearderecha);
    }

private void iniciar_modelo_proveedorexistencias()
{
        jtable_modelo_proveedorexistencia=new javax.swing.table.DefaultTableModel();//Creo el modelo

        jtable_modelo_proveedorexistencia.addColumn("Proveedor");
        jtable_modelo_proveedorexistencia.addColumn("Piezas");
        jtable_modelo_proveedorexistencia.addColumn("Costo");
        jtable_modelo_proveedorexistencia.addColumn("Precio");

}
private void iniciar_modelo_familiaexistencias()
{
      jtable_modelo_familiarexistencia=new javax.swing.table.DefaultTableModel();//Creo el modelo
      jtable_modelo_familiarexistencia.addColumn("familia");
      jtable_modelo_familiarexistencia.addColumn("Piezas");
      jtable_modelo_familiarexistencia.addColumn("Costo");
      jtable_modelo_familiarexistencia.addColumn("Precio");
}
private void iniciar_modelo_de_tabla_almacen()
    {
        jtable_modelo_almacen=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_almacen.addColumn("Familia");
        jtable_modelo_almacen.addColumn("Sub_fam.");
        jtable_modelo_almacen.addColumn("Clave");
        jtable_modelo_almacen.addColumn("Descripcion.");
        jtable_modelo_almacen.addColumn("Codigo");
        jtable_modelo_almacen.addColumn("Item.");
        jtable_modelo_almacen.addColumn("Costo");
        jtable_modelo_almacen.addColumn("Precio");
        jtable_modelo_almacen.addColumn("F. Ult. Compra");
        jtable_modelo_almacen.addColumn("Existencia");
        jtable_modelo_almacen.addColumn("Observaciones");
       //se crea intancia de la clase conexion

}
private void iniciar_modelo_de_tablaalmacenupdate()
    {
        jtable_modelo_alm_update=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_alm_update.addColumn("Familia");
        jtable_modelo_alm_update.addColumn("Sub_fam.");
        jtable_modelo_alm_update.addColumn("Clave");
        jtable_modelo_alm_update.addColumn("Descripcion.");
        jtable_modelo_alm_update.addColumn("Lugar Almacen.");
        jtable_modelo_alm_update.addColumn("Item.");
        jtable_modelo_alm_update.addColumn("Costo");
        jtable_modelo_alm_update.addColumn("Precio");
        jtable_modelo_alm_update.addColumn("F. Ult. Compra");
        jtable_modelo_alm_update.addColumn("Existencia");
        jtable_modelo_alm_update.addColumn("Observaciones");
       //se crea intancia de la clase conexion

}
private void iniciar_modelo_de_tablaalmacenupdatereplace()
    {
        jtable_modelo_alm_updatereplace=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_alm_updatereplace.addColumn("Familia");
        jtable_modelo_alm_updatereplace.addColumn("Sub_fam.");
        jtable_modelo_alm_updatereplace.addColumn("Clave");
        jtable_modelo_alm_updatereplace.addColumn("Descripcion.");
        jtable_modelo_alm_updatereplace.addColumn("Lugar Almacen.");
        jtable_modelo_alm_updatereplace.addColumn("Item.");
        jtable_modelo_alm_updatereplace.addColumn("Costo");
        jtable_modelo_alm_updatereplace.addColumn("Precio");
        jtable_modelo_alm_updatereplace.addColumn("F. Ult. Compra");
        jtable_modelo_alm_updatereplace.addColumn("Existencia");
        jtable_modelo_alm_updatereplace.addColumn("Observaciones");
       //se crea intancia de la clase conexion

}
private void iniciar_modelo_entradasalmacen()
    {

        jtable_modelo_entradaalma=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_entradaalma.addColumn("<html><b>Status</b></html>");
        jtable_modelo_entradaalma.addColumn("<html><b>Folio</b></html>");
        jtable_modelo_entradaalma.addColumn("<html><b>Doc. Ant.</b></html>");
        jtable_modelo_entradaalma.addColumn("<html><b>Proveedor</b></html>");
        jtable_modelo_entradaalma.addColumn("<html><b>Fecha</b></html>");
        jtable_modelo_entradaalma.addColumn("<html><b>F.llega A.</b></html>");
        jtable_modelo_entradaalma.addColumn("<html><b>F.Recepcion</b></html>");
        jtable_modelo_entradaalma.addColumn("<html><b>Guia Env.</b></html>");
        jtable_modelo_entradaalma.addColumn("<html><b>Piezas</b></html>");
        jtable_modelo_entradaalma.addColumn("<html><b>Costo</b></html>");
        jtable_modelo_entradaalma.addColumn("<html><b>Observaciones</b></html>");

   }
private void iniciar_modelo_entradasalmacendetalle()
    {
        jtable_modelo_entradaalmadetalle=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_entradaalmadetalle.addColumn("<html><b>Folio</b></html>");
        jtable_modelo_entradaalmadetalle.addColumn("<html><b>Clave</b></html>");
        jtable_modelo_entradaalmadetalle.addColumn("<html><b>Descripcion</b></html>");
        jtable_modelo_entradaalmadetalle.addColumn("<html><b>Item</b></html>");
        jtable_modelo_entradaalmadetalle.addColumn("<html><b>Unidad</b></html>");
        jtable_modelo_entradaalmadetalle.addColumn("<html><b>Cantidad</b></html>");
        jtable_modelo_entradaalmadetalle.addColumn("<html><b>Costo</b></html>");
        jtable_modelo_entradaalmadetalle.addColumn("<html><b>Precio</b></html>");
        jtable_modelo_entradaalmadetalle.addColumn("<html><b>Observacion</b></html>");
   }

private void iniciar_modelo_almacenes()
    {
        modelo = new javax.swing.DefaultListModel();
        try
            {
               rs = x.sieuno_executediversosv2("select * from x1distribucion_tiendas_activas(3,'','') as (tie_descri character varying(35),tie_id integer,tie_desesque character varying(25),idclie character varying(12));",variables_global.getconexiongral());
               while (rs.next())
                    {
                          modelo.addElement(rs.getString("tie_id")+":"+rs.getString("tie_descri"));
                    }
            }
            catch(Exception e)
            {
                System.out.println(e.getMessage());
            }
    }
private void iniciar_modelo_detallealma()
        {
        jtable_modelo_detallealma=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_detallealma.addColumn("<html><BODY><b>Tienda</b></BODY></html>");
        jtable_modelo_detallealma.addColumn("<html><BODY><b>Id</b></BODY></html>");
        jtable_modelo_detallealma.addColumn("<html><BODY><b>Clave</b></BODY></html>");
        jtable_modelo_detallealma.addColumn("<html><BODY><b>Codigo</b></BODY></html>");
        jtable_modelo_detallealma.addColumn("<html><BODY><b>Descripcion</b></BODY></html>");
        jtable_modelo_detallealma.addColumn("<html><BODY><b>Item</b></BODY></html>");
        jtable_modelo_detallealma.addColumn("<html><BODY><b>Precio</b></BODY></html>");
        jtable_modelo_detallealma.addColumn("<html><BODY><b>P. Rebaja</b></BODY></html>");
        jtable_modelo_detallealma.addColumn("<html><BODY><b>Ult.Costo</b></BODY></html>");
        jtable_modelo_detallealma.addColumn("<html><BODY><b>E. Min</b></BODY></html>");
        jtable_modelo_detallealma.addColumn("<html><BODY><b>E. max</b></BODY></html>");
        jtable_modelo_detallealma.addColumn("<html><BODY><b>Exi</b></BODY></html>");
        jtable_modelo_detallealma.addColumn("<html><BODY><b>Imp.Costo</b></BODY></html>");
        jtable_modelo_detallealma.addColumn("<html><BODY><b>Familia</b></BODY></html>");
     }
private void iniciar_modelo_detallealmabod()
        {
        jtable_modelo_detallealmab=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_detallealmab.addColumn("<html><BODY><b>Bodega</b></BODY></html>");
        jtable_modelo_detallealmab.addColumn("<html><BODY><b>Id</b></BODY></html>");
        jtable_modelo_detallealmab.addColumn("<html><BODY><b>Clave</b></BODY></html>");
        jtable_modelo_detallealmab.addColumn("<html><BODY><b>Codigo</b></BODY></html>");
        jtable_modelo_detallealmab.addColumn("<html><BODY><b>Descripcion</b></BODY></html>");
        jtable_modelo_detallealmab.addColumn("<html><BODY><b>Item</b></BODY></html>");
        jtable_modelo_detallealmab.addColumn("<html><BODY><b>Precio</b></BODY></html>");
        jtable_modelo_detallealmab.addColumn("<html><BODY><b>P. Rebaja</b></BODY></html>");
        jtable_modelo_detallealmab.addColumn("<html><BODY><b>Ult.Costo</b></BODY></html>");
        jtable_modelo_detallealmab.addColumn("<html><BODY><b>E. Min</b></BODY></html>");
        jtable_modelo_detallealmab.addColumn("<html><BODY><b>E. max</b></BODY></html>");
        jtable_modelo_detallealmab.addColumn("<html><BODY><b>Exi</b></BODY></html>");
        jtable_modelo_detallealmab.addColumn("<html><BODY><b>Imp.Costo</b></BODY></html>");
        jtable_modelo_detallealmab.addColumn("<html><BODY><b>Fam</b></BODY></html>");
     }

private void iniciar_modelo_detallealmaayb()
        {
        jtable_modelo_detallealmaayb=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_detallealmaayb.addColumn("<html><BODY><b>Proveedor</b></BODY></html>");
        jtable_modelo_detallealmaayb.addColumn("<html><BODY><b>Id</b></BODY></html>");
        jtable_modelo_detallealmaayb.addColumn("<html><BODY><b>Clave</b></BODY></html>");
        jtable_modelo_detallealmaayb.addColumn("<html><BODY><b>Codigo</b></BODY></html>");
        jtable_modelo_detallealmaayb.addColumn("<html><BODY><b>Descripcion</b></BODY></html>");
        jtable_modelo_detallealmaayb.addColumn("<html><BODY><b>Item</b></BODY></html>");
        jtable_modelo_detallealmaayb.addColumn("<html><BODY><b>Precio</b></BODY></html>");
        jtable_modelo_detallealmaayb.addColumn("<html><BODY><b>P. Rebaja</b></BODY></html>");
        jtable_modelo_detallealmaayb.addColumn("<html><BODY><b>Ult.Costo</b></BODY></html>");
        jtable_modelo_detallealmaayb.addColumn("<html><BODY><b>E. Min</b></BODY></html>");
        jtable_modelo_detallealmaayb.addColumn("<html><BODY><b>E. max</b></BODY></html>");
        jtable_modelo_detallealmaayb.addColumn("<html><BODY><b>Exi Bod</b></BODY></html>");
        jtable_modelo_detallealmaayb.addColumn("<html><BODY><b>Exi Tie</b></BODY></html>");
        jtable_modelo_detallealmaayb.addColumn("<html><BODY><b>Existencia</b></BODY></html>");
        jtable_modelo_detallealmaayb.addColumn("<html><BODY><b>Imp.Costo</b></BODY></html>");
        jtable_modelo_detallealmaayb.addColumn("<html><BODY><b>Familia</b></BODY></html>");
        jtable_modelo_detallealmaayb.addColumn("<html><BODY><b>Viaje</b></BODY></html>");
        jtable_modelo_detallealmaayb.addColumn("<html><BODY><b>Promocion</b></BODY></html>");
     }
private void iniciar_modelo_detallealmaaybvi()
        {
        jtable_modelo_detallealmaaybv=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_detallealmaaybv.addColumn("<html><BODY><b>Proveedor</b></BODY></html>");
        jtable_modelo_detallealmaaybv.addColumn("<html><BODY><b>Id</b></BODY></html>");
        jtable_modelo_detallealmaaybv.addColumn("<html><BODY><b>Clave</b></BODY></html>");
        jtable_modelo_detallealmaaybv.addColumn("<html><BODY><b>Codigo</b></BODY></html>");
        jtable_modelo_detallealmaaybv.addColumn("<html><BODY><b>Descripcion</b></BODY></html>");
        jtable_modelo_detallealmaaybv.addColumn("<html><BODY><b>Item</b></BODY></html>");
        jtable_modelo_detallealmaaybv.addColumn("<html><BODY><b>Precio</b></BODY></html>");
        jtable_modelo_detallealmaaybv.addColumn("<html><BODY><b>P. Rebaja</b></BODY></html>");
        jtable_modelo_detallealmaaybv.addColumn("<html><BODY><b>Ult.Costo</b></BODY></html>");
        jtable_modelo_detallealmaaybv.addColumn("<html><BODY><b>E. Min</b></BODY></html>");
        jtable_modelo_detallealmaaybv.addColumn("<html><BODY><b>E. max</b></BODY></html>");
        jtable_modelo_detallealmaaybv.addColumn("<html><BODY><b>Exi Bod</b></BODY></html>");
        jtable_modelo_detallealmaaybv.addColumn("<html><BODY><b>Exi Tie</b></BODY></html>");
        jtable_modelo_detallealmaaybv.addColumn("<html><BODY><b>Existencia</b></BODY></html>");
        jtable_modelo_detallealmaaybv.addColumn("<html><BODY><b>Imp.Costo</b></BODY></html>");
        jtable_modelo_detallealmaaybv.addColumn("<html><BODY><b>Familia</b></BODY></html>");
        jtable_modelo_detallealmaaybv.addColumn("<html><BODY><b>Viaje</b></BODY></html>");
        jtable_modelo_detallealmaaybv.addColumn("<html><BODY><b>acum compra</b></BODY></html>");
        jtable_modelo_detallealmaaybv.addColumn("<html><BODY><b>acum venta</b></BODY></html>");
        jtable_modelo_detallealmaaybv.addColumn("<html><BODY><b>F.U.Compra</b></BODY></html>");
        jtable_modelo_detallealmaaybv.addColumn("<html><BODY><b>F.Primer V.</b></BODY></html>");
        jtable_modelo_detallealmaaybv.addColumn("<html><BODY><b>F.Ult.Venta.</b></BODY></html>");
        jtable_modelo_detallealmaaybv.addColumn("<html><BODY><b>F.Aut.Traspaso.</b></BODY></html>");
        jtable_modelo_detallealmaaybv.addColumn("<html><BODY><b>F.Aut.Promocion</b></BODY></html>");
     }
    private void dioclick(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
        System.out.println("dio doble  click");
         int columna =jtb_almacen_catalogo.getSelectedColumn();
         int folio=0;
         int fila = jtb_almacen_catalogo.getSelectedRow();
         String idcadena=this.jtb_almacen_catalogo.getValueAt(fila, 2).toString();

         try
             {
                rs = x.sieuno_executediversosv2("select * from x1distribucion_terminados_codigo_buscasidsieuno('"+idcadena+"') as (idarticulo integer);",variables_global.getconexiongral());
                while (rs.next())
                        {

                            folio=rs.getInt(1);
                            articulos_sie_editar fase=new articulos_sie_editar(String.valueOf(folio));
                            fase.pack();
                            fase.setVisible(true);
                        }
                }
                catch(Exception e)
                    {
                        System.out.println(e.getMessage());
                    }

       
    }
    private void dioclick1(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
          int fila = jtb_almacen_catalogo.getSelectedRow();
         String idcadena=this.jtb_almacen_catalogo.getValueAt(fila, 2).toString();
   this.jep_articuloimagen.setText("<img src=\"http://"+variables_global.getHostfotos()+"/"+variables_global.getcarpetaaplicacion()+"/fotos/"+idcadena+".JPG\" width=\"224\" height=\"182\" border=\"0\" alt=\"Foto Articulo\"></img>");


    }
    private void dioclickdm(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
        System.out.println("dio doble  click");
        int fila = jbt_catalogoalmacen.getSelectedRow();
        String idcadena=this.jtable_modelo_entradaalma.getValueAt(fila, 1).toString();
        this.carga_datos_detalle_movinve(0, idcadena);
        this.jtf_movidfolio.setText(this.jtable_modelo_entradaalma.getValueAt(fila, 1).toString());
        this.jtf_movfecha.setText(this.jtable_modelo_entradaalma.getValueAt(fila, 4).toString().replace("<html>", "").replace("</html>", "").replace("<br>", ""));
        this.jtf_movdescribe.setText(this.jtable_modelo_entradaalma.getValueAt(fila, 3).toString());
        this.jtf_movalmacen.setText(this.jtable_modelo_entradaalma.getValueAt(fila, 0).toString());
        this.jtf_piezasmov.setText(this.jtable_modelo_entradaalma.getValueAt(fila, 8).toString());

        //setVisible(false);
    }

 private void dioclickproveedor(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
         System.out.println("dio doble  click");
         int fila = jtb_almacen_proveedor.getSelectedRow();
         String valor[] = jtb_almacen_proveedor.getValueAt(fila, 0).toString().split(":");
        com_distri_compras_proveedores_edita fcdcpe=new com_distri_compras_proveedores_edita(valor[0]);
        fcdcpe.pack();
        fcdcpe.setVisible(true);

    }
 private void dioclickfamilia(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
       System.out.println("dio doble  click");
       int fila = jtb_almacen_familias.getSelectedRow();

       String idcadena[]=this.jtb_almacen_familias.getValueAt(fila, 0).toString().split(":");

       this.jtf_busqueda.setText(idcadena[0]);
       if(JOptionPane.showConfirmDialog(null, "Desea Ver los Articulos de Esta Familia?")==0) {
            opbuscamp=1;
            this.buttonGroup2.setSelected(jrb_obexacto.getModel(), true);
            buscamp=5;
            this.buttonGroup1.setSelected(jrb_bidfam.getModel(), true);
            this.carga_datos_catalogoarticulos(buscamp,opbuscamp,this.jtf_busqueda.getText().toUpperCase().trim(),1);
        } else {
            //this.jtf_busqueda.requestFocus();
        }

    }
  private void dioclickartialma(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
        //System.out.println("dio doble  click");
        int fila = jtb_almacen_control.getSelectedRow();
        String idcadena=this.jtable_modelo_almacen.getValueAt(fila, 2).toString();

        com_distri_articulos_almacen_detalle fcdaad=new com_distri_articulos_almacen_detalle(1,idcadena);
        fcdaad.pack();
        fcdaad.setVisible(true);
    }
private void dioclickdetalm(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
      String idtie[]=this.jlst_clientesdistribucion.getSelectedValue().toString().split(":");
     if(JOptionPane.showConfirmDialog(null, "Desea Ver Articulos de este Almacen?")==0)
            {
                    
                    this.jtf_idtienda.setText(idtie[0]);
                    this.jtf_idtiendades.setText(idtie[1]);
                    this.carga_datos_detallealmacen(5, idtie[0],ordenamiento);
                    this.carga_datos_detallealmacenbod(5, idtie[0],ordenamiento);
            }
                    this.jtf_idtienda.setText(idtie[0]);
                    this.jtf_idtiendades.setText(idtie[1]);
    }
private void dioclickdetalmayb(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
                        String idtie[]=this.jlst_clientesdistribucion1.getSelectedValue().toString().split(":");
                    this.jtf_idtienda1.setText(idtie[0]);
                    this.jtf_idtiendades1.setText(idtie[1]);
                    this.jtf_idtiendahistorico.setText(idtie[0]);
                    this.jtf_idtiendades3.setText(idtie[1]);
     if(JOptionPane.showConfirmDialog(null, "Desea Ver Articulos de este Almacen?")==0)
            {

                    this.carga_datos_detallealmacenayb(19, idtie[0],ordenamiento);


            }

    }
private void dioclickdetalmaybv(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
     if(JOptionPane.showConfirmDialog(null, "Desea Ver Articulos de este Almacen?")==0)
            {
                    String idtie[]=this.jlst_clientesdistribucion2.getSelectedValue().toString().split(":");
                    this.jtf_idtienda2.setText(idtie[0]);
                    this.jtf_idtiendades2.setText(idtie[1]);
                    this.carga_datos_detallealmacenaybvigencia(21, idtie[0],buscampv);

            }

    }
private void dioclickartialmaupdate(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
        //System.out.println("dio doble  click");
        int fila =jtb_almacen_actualiza.getSelectedRow();
        jtable_modelo_alm_updatereplace.addRow(new Object[]{this.jtable_modelo_alm_update.getValueAt(fila, 0).toString(),this.jtable_modelo_alm_update.getValueAt(fila, 1).toString(),this.jtable_modelo_alm_update.getValueAt(fila, 2).toString(),this.jtable_modelo_alm_update.getValueAt(fila, 3).toString(),this.jtf_textoactualizar.getText().toUpperCase().trim(),this.jtable_modelo_alm_update.getValueAt(fila, 5).toString(),this.jtable_modelo_alm_update.getValueAt(fila, 6).toString(),this.jtable_modelo_alm_update.getValueAt(fila, 7).toString(),this.jtable_modelo_alm_update.getValueAt(fila, 8).toString(),this.jtable_modelo_alm_update.getValueAt(fila, 9)+""});
    }
private void dioclickalmacendet(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
         System.out.println("dio doble  click");
         int fila = jtbl_articulosentiendas.getSelectedRow();
         String valor = jtable_modelo_detallealma.getValueAt(fila, 1).toString();

        //JFrame mainFrame = Sie_invdisApp.getApplication().getMainFrame();
        articulos_sie_editar fase=new articulos_sie_editar(valor);
        fase.pack();
        fase.setVisible(true);
        //setVisible(false);
    }

 private void carga_datos_catalogoarticulos(int rbbuscam,int rbopbuscam,String busqueda,int opcionlimpia)
 {
      String textohtml="";
      textohtml="<tr><th>Clave Articulo/Descripcion/foto</th><th>Clave Articulo/Descripcion/foto</th><th>Clave Articulo/Descripcion/foto</th><th>Clave Articulo/Descripcion/foto</th></tr>";
      int fila=0;
      if (opcionlimpia>0)
            {
                while(jtable_modelo.getRowCount()>0)jtable_modelo.removeRow(0);
            }
      String texto="select * from x1distribucion_terminados_articulos_catalogo("+rbbuscam+","+rbopbuscam+",'"+busqueda+"') as (id character varying(16),idstatus smallint,statusdescribe text,describearticulo character varying(80),describcorta character varying(20),unsal character varying(3),unent character varying(3),facentruni numeric,uniempaque character varying(12),idtempo smallint,describetemp text,idfamilia character varying(5),familiadescribe character varying(40),controlalma character varying(20),stocminimo numeric,stocmaximo numeric,precio1 numeric,perecio2 numeric,precio3 numeric,precio4 numeric,precio5 numeric,ultimocosto numeric,costoprom numeric,pensurtir numeric,tiemposurtido smallint,acumprod numeric,acumimporte numeric,idtipoarticulo smallint,tipodescribe text,fechaprototipo date,fechaautoriza date,fechainiprod date,fechaultimaent date,usuario character varying(20),observacion character varying(255),idprovee character varying(12),nombrecreador character varying(80),valor_x character varying(20),valorx_st character varying(20),idpersonal character varying(16),nombrepersonal character varying(80),descripprovee character varying(60),existencia numeric)";
      try
        {
           rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                    jtable_modelo.addRow(new Object[]{rs.getString ("idfamilia")+":"+rs.getString ("idfamilia"),rs.getString ("idprovee")+":"+rs.getString ("idprovee"),rs.getString ("id"),rs.getString ("describearticulo"),rs.getString ("controlalma"),rs.getString ("valor_x"),rs.getString ("ultimocosto"),rs.getString ("precio5"),rs.getString ("fechaultimaent"),rs.getString ("existencia"),rs.getString ("observacion")});

                     if (fila<=0)
    					{
            					textohtml+= "<tr>";
        				}
					fila++;
                    textohtml+="<th>"+rs.getString ("id")+"<br>"+rs.getString ("describearticulo") + " $"+rs.getString ("precio5")+" Exis="+rs.getString ("existencia") +"<br>"+"<img src=\"http://"+variables_global.getHostfotos()+"/"+variables_global.getcarpetaaplicacion()+"/fotos/"+rs.getString ("valor_x")+".JPG\" width=230 height=190 border=0 alt=\"Foto Articulo\" />"+"</th>";
                    if (fila>=4)
                        {
                            textohtml+= "</tr>";
                            fila=0;
                        }
                }
        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }
        this.jlbl_cantidadregistros.setText(String.valueOf(this.jtable_modelo.getRowCount()));
        this.jlbl_textobuscado.setText(this.jtf_busqueda.getText().toUpperCase().trim());
        yacarguefotos=0;

 }
 private void carga_datos_catalogoarticulos_almacen(int rbbuscam,int rbopbuscam,String busqueda,int opcionlimpia)
 {
     textohtml="<tr><th>Clave Articulo/Descripcion/foto</th><th>Clave Articulo/Descripcion/foto</th><th>Clave Articulo/Descripcion/foto</th><th>Clave Articulo/Descripcion/foto</th></tr>";
     DecimalFormat myForma = new DecimalFormat("###,###,###,###.##");
     int fila=0;
           if (opcionlimpia>0)
            {
                while(jtable_modelo_almacen.getRowCount()>0)jtable_modelo_almacen.removeRow(0);
                while(jtable_modelo_alm_update.getRowCount()>0)jtable_modelo_alm_update.removeRow(0);
            }
     
     String texto="select * from x1distribucion_terminados_articulos_catalogov2("+rbbuscam+","+rbopbuscam+",'"+busqueda+"') as (id character varying(16),codbarra character varying(16),idstatus smallint,statusdescribe text,describearticulo character varying(80),describcorta character varying(20),unsal character varying(3),unent character varying(3),facentruni numeric,uniempaque character varying(12),idtempo smallint,describetemp text,idfamilia character varying(5),familiadescribe character varying(40),controlalma character varying(20),stocminimo numeric,stocmaximo numeric,precio1 numeric,perecio2 numeric,precio3 numeric,precio4 numeric,precio5 numeric,ultimocosto numeric,costoprom numeric,pensurtir numeric,tiemposurtido smallint,acumprod numeric,acumimporte numeric,idtipoarticulo smallint,tipodescribe text,fechaprototipo date,fechaautoriza date,fechainiprod date,fechaultimaent date,usuario character varying(20),observacion character varying(255),idprovee character varying(12),descripprovee character varying(60),nombrecreador character varying(80),valor_x character varying(20),valorx_st character varying(20),idpersonal character varying(16),nombrepersonal character varying(80),idlinea smallint,describelinea text,existenciaf numeric,almacenlugar text,existencia numeric)";
     System.out.println(texto);
     try
        {
        rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                    jtable_modelo_almacen.addRow(new Object[]{rs.getString ("idfamilia")+":"+rs.getString ("familiadescribe"),rs.getString ("idprovee")+":"+rs.getString ("descripprovee"),rs.getString ("id"),rs.getString ("describearticulo"),rs.getString ("codbarra"),rs.getString("valor_x")+" ",myForma.format(rs.getFloat("ultimocosto")),rs.getString ("precio5"),rs.getString ("fechaultimaent"),rs.getString("existencia"),rs.getString ("observacion")});
                    jtable_modelo_alm_update.addRow(new Object[]{rs.getString ("idfamilia")+":"+rs.getString ("familiadescribe"),rs.getString ("idprovee")+":"+rs.getString ("descripprovee"),rs.getString ("id"),rs.getString ("describearticulo"),rs.getString ("codbarra"),rs.getString ("valor_x"),myForma.format(rs.getFloat("ultimocosto")),rs.getString ("precio5"),rs.getString ("fechaultimaent"),rs.getString ("existencia"),rs.getString ("observacion")});
                    if (fila<=0)
    					{
            					textohtml+= "<tr>";
        				}
					fila++;
                    textohtml+="<th>"+rs.getString ("id")+"<br>"+rs.getString ("describearticulo") + " $"+rs.getString ("precio5")+" Exis="+rs.getString ("existencia") +"<br>"+"<img src=\"http://"+variables_global.getHostfotos()+"/"+variables_global.getcarpetaaplicacion()+"/fotos/"+rs.getString ("id")+".JPG\" width=230 height=190 border=0 alt=\"Foto Articulo\" />"+"</th>";
                    if (fila>=4)
                        {
                            textohtml+= "</tr>";
                            fila=0;
                        }
                }
        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }
        this.jlbl_cantidadregistros1.setText(String.valueOf(this.jtable_modelo_almacen.getRowCount()));
 }
private void carga_datos_existxfamilia()
    {
      DecimalFormat myForma = new DecimalFormat("###,###,###,###");
      String texto="select * from x1distribucion_terminados_almacen_costosfamilias(1) as (idfam character varying(5),existencia numeric,importecosto numeric, importeprecio numeric,descri_familia character varying(40))";

       try
        {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                    jtable_modelo_familiarexistencia.addRow(new Object[]{rs.getString ("idfam")+":"+rs.getString ("descri_familia"),myForma.format(rs.getFloat("existencia")),myForma.format(rs.getFloat("importecosto")),myForma.format(rs.getFloat("importeprecio"))});
                }
        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }
    }
private void carga_datos_existxproveedor()
    {
      DecimalFormat myForma = new DecimalFormat("###,###,###,###");
      String texto="select * from x1distribucion_terminados_almacen_costosproveedor(1) as (idpro character varying(12),existencia numeric,importecosto numeric, importeprecio numeric,descri_proveedor character varying(60))";

       try
        {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                    jtable_modelo_proveedorexistencia.addRow(new Object[]{rs.getString ("idpro")+":"+rs.getString ("descri_proveedor"),myForma.format(rs.getFloat("existencia")),myForma.format(rs.getFloat("importecosto")),myForma.format(rs.getFloat("importeprecio"))});
                }
        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }
    }

private void carga_datos_catentraalmacen(int opbus,String tbusca,String tbusca2)
    {
       String fechacat = "",fechallegatienda="",fechaentrega="",abrehtml="<html><body>",cierrahtml="</body></html>",texto="";
       DecimalFormat miformat = new DecimalFormat("###,###,###,###");
       Object[] fnewRow = new Object[11];
       //invoco al metodo que trae el recordset de datos
      texto="select * from x1distribucion_terminados_almacen_entradas_catalogo("+opbus+",'"+tbusca+"','"+tbusca2+"') as (idfol integer,id character varying(12),idesta smallint,desta character varying(15),claveperdoc character varying(12),dante character varying(12),dsiguiente character varying(12), fedoc date,feent date,fechaven date,impuesto numeric,impuesto2 numeric,destotot numeric,destofinan numeric,idproveedor character varying(12), idprovdescribe character varying(60),obserdoc character varying(255),usuario character varying(12), flete numeric,guia character varying(60),fechaenvio date,idmoneda smallint,describemoneda character varying(30),idalmacen smallint,describealmacehr character varying(30),pzaente numeric,pzasal numeric,importeent numeric,importesal numeric);";
        try
         {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                 fnewRow[0]=rs.getString ("desta");
                 fnewRow[1]=rs.getString ("id");
                 fnewRow[2]=rs.getString("dante");
                 fnewRow[3]=rs.getString ("idproveedor")+":"+rs.getString ("idprovdescribe");
                 fnewRow[4]=abrehtml+this.fechaeuropea( rs.getString ("fedoc"))+":<br>"+DiaSemana(this.fechaeuropea(rs.getString("fedoc")))+cierrahtml;
                 if(rs.getString("feent") != null)
                        {
                           fechallegatienda=abrehtml+ rs.getString("feent")+":<br>"+DiaSemana(rs.getString ("feent"))+cierrahtml;
                        }
                 fnewRow[5]=fechallegatienda;
                 if(rs.getString("fechaven") != null )
                        {
                            fechaentrega=abrehtml+rs.getString ("fechaven")+":<br>"+this.DiaSemana(rs.getString("fechaven"))+cierrahtml;
                        }
                 fnewRow[6]=fechaentrega;
                 fnewRow[7]="";
                 fnewRow[8]=miformat.format(rs.getFloat("pzasal"));
                 fnewRow[9]=miformat.format(rs.getFloat("importesal"));
                 fnewRow[10]=rs.getString ("obserdoc");
                 jtable_modelo_entradaalma.addRow(fnewRow);
                }
        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }
        this.centrar_datos();
      }


private void carga_datos_detalle_movinve(int opbus,String folio)
{

       DecimalFormat miformat = new DecimalFormat("###,###,###,###");
       DecimalFormat miformatde = new DecimalFormat("###,###,###,###.##");
       Object[] fnewRow = new Object[9];
       String texto="select * from x1distribucion_terminados_almacen_entradas_catdetalle("+opbus+",'"+folio+"','') as (id integer,iddocto character varying(12), idarticulo character varying(16),canent numeric,factor numeric,cansal numeric,costoent numeric,costosal numeric,importe numeric,descuento1 numeric,descuento2 numeric,impuesto1 numeric,impuesto2 numeric,politicades smallint,tipocambio numeric,obserpartida character varying(60),describearticulo character varying(80),unidadsal character varying(3),item character varying(20),precio5 numeric);";
       //invoco al metodo que trae el recordset de datos
       System.out.println(texto);
       while(jtable_modelo_entradaalmadetalle.getRowCount()>0)jtable_modelo_entradaalmadetalle.removeRow(0);
        try
         {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                    fnewRow[0]=rs.getString("iddocto");
                    fnewRow[1]=rs.getString("idarticulo");
                    fnewRow[2]=rs.getString("describearticulo");
                    fnewRow[3]=rs.getString("item");
                    fnewRow[4]=rs.getString("unidadsal");
                    fnewRow[5]=miformat.format(rs.getFloat("cansal"));
                    fnewRow[6]=miformatde.format(rs.getFloat("costosal"));
                    fnewRow[7]=miformat.format(rs.getFloat("precio5"));
                    fnewRow[8]=rs.getString("obserpartida");
                    jtable_modelo_entradaalmadetalle.addRow(fnewRow);
                }
        }
        catch(Exception e)
            {
                System.out.println(e.getMessage());
            }
}

private void carga_datos_detallealmacen(int opcion,String idtienda,int orden)
        {
            String texto="";
            while(jtable_modelo_detallealma.getRowCount()>0)jtable_modelo_detallealma.removeRow(0);
            if(this.jcbx_solonegativas1.isSelected()==true)
                {
                    texto="select * from x1sieuno_articulo_detalle_ventasacumv3(14,"+idtienda+",'','','"+orden+"') as (ida integer,min integer,max integer,exi double precision,idp integer,cod text,cndt integer,descor text,preve double precision,pre_re real,clavepro text,item text,premay real,ultcos numeric,fam character varying(30),descuento numeric)";
                }
            else
                {
                    texto="select * from x1sieuno_articulo_detalle_ventasacumv3(13,"+idtienda+",'','','"+orden+"') as (ida integer,min integer,max integer,exi double precision,idp integer,cod text,cndt integer,descor text,preve double precision,pre_re real,clavepro text,item text,premay real,ultcos numeric,fam character varying(30),descuento numeric)";
                }
            System.out.println(texto);
            String despartido[]=null;
            Object[] fnewRow = new Object[14];
            DecimalFormat myFormad = new DecimalFormat("############");
            DecimalFormat myForma = new DecimalFormat("############.##");
            DecimalFormat myForma2 = new DecimalFormat("###,###,###,###.##");
            int artreb=0,artpro=0;
            double texi=0,tcos=0,tpre=0,tprer=0,descu=0,exireb=0,exides=0;
            try
               {
               rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
               while (rs.next())
                    {


                            despartido=rs.getString("descor").split(":");
                            fnewRow[0]=despartido[0]+":"+despartido[2];
                            fnewRow[1]=rs.getString ("idp");
                            fnewRow[2]=rs.getString ("clavepro");
                            fnewRow[3]=rs.getString ("cod");
                            fnewRow[4]=despartido[1];
                            if(rs.getString("item")!=null)
                                {
                                    fnewRow[5]=rs.getString("item")+"";
                                }
                            else
                                {
                                    fnewRow[5]="";
                                }
                            fnewRow[6]=rs.getString("preve")+" ";
                            if(rs.getString("pre_re")!=null)
                                {
                                    fnewRow[7]=rs.getString("pre_re")+"";
                                    tprer+=(rs.getDouble("pre_re")-rs.getDouble("preve"))*rs.getDouble("exi");
                                    artreb+=1;
                                    exireb+=rs.getDouble("exi");
                                }
                            else
                                {
                                    if(rs.getFloat("descuento")>0)
                                        {
                                            fnewRow[7]=myFormad.format(rs.getFloat("descuento"))+"%";
                                            descu+=((rs.getFloat("descuento")/100)*rs.getDouble("preve"))*rs.getDouble("exi");
                                            artpro+=1;
                                            exides+=rs.getDouble("exi");
                                        }
                                    else
                                    {
                                    fnewRow[7]="";
                                    }
                                }
                            fnewRow[8]=myForma.format(rs.getFloat("ultcos"));
                            fnewRow[9]=rs.getString("min");
                            fnewRow[10]=rs.getString("max");
                            fnewRow[11]=rs.getString("exi");
                            fnewRow[12]=myForma.format(rs.getDouble("ultcos")*rs.getDouble("exi"));
                             fnewRow[13]=rs.getString("fam")+"";
                            if(this.jcbx_solonegativas.isSelected()==true)
                                {
                                    if(rs.getInt("exi")<0)
                                        {
                                            jtable_modelo_detallealma.addRow(fnewRow);
                                        }
                                }
                            else
                                {
                                    jtable_modelo_detallealma.addRow(fnewRow);
                                }
                          
                            texi+=rs.getDouble("exi");

                            tcos+=rs.getDouble("ultcos")*rs.getDouble("exi");
                            tpre+=rs.getDouble("preve")*rs.getDouble("exi");

                    }
                }
            catch(Exception e)
                {
                    System.out.println(e.getMessage());
                }
            this.jtf_tiendaarti.setText(""+jtable_modelo_detallealma.getRowCount());
            fnewRow[0]=this.jtf_idtienda.getText()+":"+this.jtf_idtiendades.getText();
                            fnewRow[1]="";
                            fnewRow[2]="";
                            fnewRow[3]="";
                            fnewRow[4]="Totales";
                            fnewRow[5]="";
                            fnewRow[6]=myForma2.format(tpre);
                            fnewRow[7]=myForma2.format(tpre+tprer);
                            fnewRow[8]="";
                            fnewRow[9]="";
                            fnewRow[10]="";
                            fnewRow[11]=myForma2.format(texi);
                            fnewRow[12]=myForma2.format(tcos);
                            fnewRow[13]="";
                            //jtable_modelo_detallealma.addRow(fnewRow);
                            this.jtf_tiendat1.setText(myForma2.format(texi));
                            this.jtf_tiendat2.setText(myForma2.format(tcos));
                            this.jtf_tiendat3.setText(myForma2.format(tpre));
                            this.jtf_tiendat5.setText(myForma2.format(tprer*-1));
                            this.jtf_tiendat13.setText(myForma2.format(descu));
                            this.jtf_tiendat14.setText(myForma2.format((tpre+tprer)-descu));
                            this.jtf_articulosrebajados.setText(myForma2.format(artreb));
                            this.jtf_articulosrebajados1.setText(myForma2.format(artpro));

                            this.jtf_articulosrebajados4.setText(myForma2.format(exireb));
                            this.jtf_articulosrebajados5.setText(myForma2.format(exides));


        }

private void carga_datos_detallealmacenayb(int opcion,String idtienda,int orden)
        {
            String texto="";
            while(jtable_modelo_detallealmaayb.getRowCount()>0)jtable_modelo_detallealmaayb.removeRow(0);
           
            texto="select * from x1sieuno_articulo_detalle_ventasacum_a_y_b("+opcion+","+idtienda+",'','','"+orden+"') as (ida integer,min integer,max integer,exi numeric,idp integer,cod text,cndt integer,descor text,preve double precision,pre_re real,clavepro text,item text,premay real,ultcos numeric,fam character varying(30),exit numeric,exib numeric,descuento numeric,subfam character varying(50),viaje character varying(30),foto boolean,aux text)";
            System.out.println(texto);
            String despartido[]=null;
            Object[] fnewRow = new Object[18];
            DecimalFormat myFormad = new DecimalFormat("############");
            DecimalFormat myForma = new DecimalFormat("############.##");
            DecimalFormat myForma2 = new DecimalFormat("###,###,###,###.##");
            int artreb=0,artpro=0;
            double texi=0,tcos=0,tpre=0,tprer=0,texit=0,texib=0,descu=0,exireb=0,exides=0;
            try
               {
               rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
               while (rs.next())
                    {
                            despartido=rs.getString("descor").split(":");
                            //fnewRow[0]=despartido[0]+":"+despartido[2];
                            fnewRow[0]=rs.getString ("subfam");
                            fnewRow[1]=rs.getString ("idp");
                            fnewRow[2]=rs.getString ("clavepro");
                            fnewRow[3]=rs.getString ("cod");
                            fnewRow[4]=despartido[1];
                            if(rs.getString("item")!=null)
                                {
                                    fnewRow[5]=rs.getString("item")+"";
                                }
                            else
                                {
                                    fnewRow[5]="";
                                }
                            fnewRow[6]=rs.getString("preve")+" ";
                            if(rs.getString("pre_re")!=null)
                                {
                                    fnewRow[7]=rs.getString("pre_re");
                                    tprer+=(rs.getDouble("pre_re")-rs.getDouble("preve"))*rs.getDouble("exi");
                                    artreb+=1;
                                    exireb+=rs.getDouble("exi");
                                }
                            else
                                {
                                     if(rs.getFloat("descuento")>0)
                                        {
                                            fnewRow[7]=myForma.format(rs.getFloat("descuento"))+"%";
                                            descu+=((rs.getFloat("descuento")/100)*rs.getDouble("preve"))*rs.getDouble("exi");
                                            artpro+=1;
                                            exides+=rs.getDouble("exi");
                                        }
                                    else
                                        {
                                            fnewRow[7]="";
                                        }
                                }
                            fnewRow[8]=myForma.format(rs.getFloat("ultcos"));
                            fnewRow[9]=rs.getString("min");
                            fnewRow[10]=rs.getString("max");
                            fnewRow[11]=rs.getString("exib");
                            fnewRow[12]=rs.getString("exit");
                            fnewRow[13]=rs.getString("exi");
                            fnewRow[14]=myForma.format(rs.getDouble("ultcos")*rs.getDouble("exi"));
                            fnewRow[15]=rs.getString("fam")+"";
                            fnewRow[16]=rs.getString("viaje")+"";
                            fnewRow[17]=rs.getString("aux")+"";
                            if(this.jcbx_solonegativas.isSelected()==true)
                                {
                                    if(rs.getInt("exi")<0)
                                        {
                                            jtable_modelo_detallealmaayb.addRow(fnewRow);
                                        }
                                }
                            else
                                {
                                    jtable_modelo_detallealmaayb.addRow(fnewRow);
                                }

                            texi+=rs.getDouble("exi");

                            texit+=rs.getDouble("exit");
                            texib+=rs.getDouble("exib");

                            tcos+=rs.getDouble("ultcos")*rs.getDouble("exi");
                            tpre+=rs.getFloat("preve")*rs.getFloat("exi");

                    }
                }
            catch(Exception e)
                {
                    System.out.println(e.getMessage());
                }
            this.jtf_tiendaarti2.setText(""+jtable_modelo_detallealmaayb.getRowCount());
            fnewRow[0]=this.jtf_idtienda1.getText()+":"+this.jtf_idtiendades1.getText();
                            fnewRow[1]="";
                            fnewRow[2]="";
                            fnewRow[3]="";
                            fnewRow[4]="Totales";
                            fnewRow[5]="";
                            fnewRow[6]=myForma2.format(tpre);
                            fnewRow[7]=myForma2.format(tpre+tprer);
                            fnewRow[8]="";
                            fnewRow[9]="";
                            fnewRow[10]="";
                            fnewRow[11]="";
                            fnewRow[12]="";
                            fnewRow[13]=myForma2.format(texi);
                            fnewRow[14]=myForma2.format(tcos);
                            fnewRow[15]="";
                            //jtable_modelo_detallealma.addRow(fnewRow);
                            this.jtf_tiendabodega.setText(myForma2.format(texib));
                            this.jtf_tienda_piso.setText(myForma2.format(texit));

                            this.jtf_tiendat9.setText(myForma2.format(texi));
                            this.jtf_tiendat10.setText(myForma2.format(tcos));
                            this.jtf_tiendat11.setText(myForma2.format(tpre));
                            this.jtf_tiendat12.setText(myForma2.format(tprer*-1));
                            this.jtf_tiendat17.setText(myForma2.format(descu));
                            this.jtf_tiendat18.setText(myForma2.format((tpre+tprer)-descu));

                            this.jtf_tiendaarti3.setText(myForma2.format(artreb));
                            this.jtf_tiendaarti4.setText(myForma2.format(artpro));

                            this.jtf_tiendaarti5.setText(myForma2.format(exireb));
                            this.jtf_tiendaarti6.setText(myForma2.format(exides));

        }
private void carga_datos_detallealmacenaybvigencia(int opcion,String idtienda,int orden)
        {
            String texto="";
            while(jtable_modelo_detallealmaaybv.getRowCount()>0)jtable_modelo_detallealmaaybv.removeRow(0);

            texto="select * from x1sieuno_articulo_detalle_ventasacum_aybhistorico("+opcion+","+idtienda+",'','','"+orden+"') as (ida integer,min integer,max integer,exi numeric,idp integer,cod text,cndt integer,descor text,preve double precision,pre_re real,clavepro text,item text,premay real,ultcos numeric,fam character varying(30),exit numeric,exib numeric,descuento numeric,subfam character varying(50),viaje character varying(30),foto boolean,acumv numeric,acumc numeric,fechauc date,fechaaut date,faupro date,fpv date,fuv date)";
            System.out.println(texto);
            String despartido[]=null;
            Object[] fnewRow = new Object[24];
            DecimalFormat myFormad = new DecimalFormat("############");
            DecimalFormat myForma = new DecimalFormat("############.##");
            DecimalFormat myForma2 = new DecimalFormat("###,###,###,###.##");
            int artreb=0,artpro=0;
            double texi=0,tcos=0,tpre=0,tprer=0,texit=0,texib=0,descu=0,exireb=0,exides=0;
            try
               {
               rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
               while (rs.next())
                    {
                            despartido=rs.getString("descor").split(":");
                            //fnewRow[0]=despartido[0]+":"+despartido[2];
                            fnewRow[0]=rs.getString ("subfam");
                            fnewRow[1]=rs.getString ("idp");
                            fnewRow[2]=rs.getString ("clavepro");
                            fnewRow[3]=rs.getString ("cod");
                            fnewRow[4]=despartido[1];
                            if(rs.getString("item")!=null)
                                {
                                    fnewRow[5]=rs.getString("item")+"";
                                }
                            else
                                {
                                    fnewRow[5]="";
                                }
                            fnewRow[6]=rs.getString("preve")+" ";
                            if(rs.getString("pre_re")!=null)
                                {
                                    fnewRow[7]=rs.getString("pre_re")+"";
                                    tprer+=(rs.getDouble("pre_re")-rs.getDouble("preve"))*rs.getDouble("exi");
                                    artreb+=1;
                                    exireb+=rs.getDouble("exi");
                                }
                            else
                                {
                                     if(rs.getFloat("descuento")>0)
                                        {
                                            fnewRow[7]=myFormad.format(rs.getFloat("descuento"))+"%";
                                            descu+=((rs.getFloat("descuento")/100)*rs.getDouble("preve"))*rs.getDouble("exi");
                                            artpro+=1;
                                            exides+=rs.getDouble("exi");
                                        }
                                    else
                                        {
                                            fnewRow[7]="";
                                        }
                                }
                            fnewRow[8]=myForma.format(rs.getFloat("ultcos"));
                            fnewRow[9]=rs.getString("min");
                            fnewRow[10]=rs.getString("max");
                            fnewRow[11]=rs.getString("exib");
                            fnewRow[12]=rs.getString("exit");
                            fnewRow[13]=rs.getString("exi");
                            fnewRow[14]=myForma.format(rs.getDouble("ultcos")*rs.getDouble("exi"));
                            fnewRow[15]=rs.getString("fam")+"";
                            fnewRow[16]=rs.getString("viaje")+"";
                            fnewRow[17]=myForma.format(rs.getDouble("acumc"));
                            fnewRow[18]=myForma.format(rs.getDouble("acumv"));
                            if(rs.getString("fechauc") != null)
                                        {
                                            fnewRow[19]="<html>"+this.fechaeuropea(rs.getString("fechauc"))+"</html>";
                                        }
                                    else
                                        {
                                            fnewRow[19]="";
                                        }
                            if(rs.getString("fpv") != null)
                                        {
                                            fnewRow[20]="<html>"+this.fechaeuropea(rs.getString("fpv"))+"</html>";
                                        }
                                    else
                                        {
                                            fnewRow[20]="";
                                        }
                            if(rs.getString("fuv") != null)
                                        {
                                            fnewRow[21]="<html>"+this.fechaeuropea(rs.getString("fuv"))+"</html>";
                                        }
                                    else
                                        {
                                            fnewRow[21]="";
                                        }
                            if(rs.getString("fechaaut") != null)
                                        {
                                            fnewRow[22]="<html>"+this.fechaeuropea(rs.getString("fechaaut"))+"</html>";
                                        }
                                    else
                                        {
                                            fnewRow[22]="";
                                        }
                            if(rs.getString("faupro") != null)
                                        {
                                            fnewRow[23]="<html>"+this.fechaeuropea(rs.getString("faupro"))+"</html>";
                                        }
                                    else
                                        {
                                            fnewRow[23]="";
                                        }
                            if(this.jcbx_solonegativas.isSelected()==true)
                                {
                                    if(rs.getInt("exi")<0)
                                        {
                                            jtable_modelo_detallealmaaybv.addRow(fnewRow);
                                        }
                                }
                            else
                                {
                                    jtable_modelo_detallealmaaybv.addRow(fnewRow);
                                }

                            texi+=rs.getDouble("exi");

                            texit+=rs.getDouble("exit");
                            texib+=rs.getDouble("exib");

                            tcos+=rs.getDouble("ultcos")*rs.getDouble("exi");
                            tpre+=rs.getFloat("preve")*rs.getFloat("exi");

                    }
                }
            catch(Exception e)
                {
                    System.out.println(e.getMessage());
                }
            this.jtf_articulosvigentes.setText(""+jtable_modelo_detallealmaaybv.getRowCount());
            fnewRow[0]=this.jtf_idtienda1.getText()+":"+this.jtf_idtiendades1.getText();
                            fnewRow[1]="";
                            fnewRow[2]="";
                            fnewRow[3]="";
                            fnewRow[4]="Totales";
                            fnewRow[5]="";
                            fnewRow[6]=myForma2.format(tpre);
                            fnewRow[7]=myForma2.format(tpre+tprer);
                            fnewRow[8]="";
                            fnewRow[9]="";
                            fnewRow[10]="";
                            fnewRow[11]="";
                            fnewRow[12]="";
                            fnewRow[13]=myForma2.format(texi);
                            fnewRow[14]=myForma2.format(tcos);
                            fnewRow[15]="";
                            //jtable_modelo_detallealma.addRow(fnewRow);
                            this.jtf_tiendabodega.setText(myForma2.format(texib));
                            this.jtf_tienda_piso.setText(myForma2.format(texit));

                            this.jtf_tiendat9.setText(myForma2.format(texi));
                            this.jtf_tiendat10.setText(myForma2.format(tcos));
                            this.jtf_tiendat11.setText(myForma2.format(tpre));
                            this.jtf_tiendat12.setText(myForma2.format(tprer*-1));
                            this.jtf_tiendat17.setText(myForma2.format(descu));
                            this.jtf_tiendat18.setText(myForma2.format((tpre+tprer)-descu));

                            this.jtf_tiendaarti3.setText(myForma2.format(artreb));
                            this.jtf_tiendaarti4.setText(myForma2.format(artpro));

                            this.jtf_tiendaarti5.setText(myForma2.format(exireb));
                            this.jtf_tiendaarti6.setText(myForma2.format(exides));

        }

private void carga_datos_detallealmacenaybhistorico(int opcion,String idtienda,int orden,String fecha)
        {
            String texto="";
            while(jtable_modelo_detallealmaayb.getRowCount()>0)jtable_modelo_detallealmaayb.removeRow(0);

            texto="select * from x1sieuno_articulo_detalle_ventasacum_aybhistorico("+opcion+","+idtienda+",'"+fecha+"','','"+orden+"') as (ida integer,min integer,max integer,exi numeric,idp integer,cod text,cndt integer,descor text,preve double precision,pre_re real,clavepro text,item text,premay real,ultcos numeric,fam character varying(30),exit numeric,exib numeric,descuento numeric,subfam character varying(50),viaje character varying(30),foto boolean,aux text)";
            System.out.println(texto);
            String despartido[]=null;
            Object[] fnewRow = new Object[18];
            DecimalFormat myFormad = new DecimalFormat("############");
            DecimalFormat myForma = new DecimalFormat("############.##");
            DecimalFormat myForma2 = new DecimalFormat("###,###,###,###.##");
            int artreb=0,artpro=0;
            double texi=0,tcos=0,tpre=0,tprer=0,texit=0,texib=0,descu=0,exireb=0,exides=0;
            try
               {
               rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
               while (rs.next())
                    {
                            despartido=rs.getString("descor").split(":");
                            //fnewRow[0]=despartido[0]+":"+despartido[2];
                            fnewRow[0]=rs.getString ("subfam");
                            fnewRow[1]=rs.getString ("idp");
                            fnewRow[2]=rs.getString ("clavepro");
                            fnewRow[3]=rs.getString ("cod");
                            fnewRow[4]=despartido[1];
                            if(rs.getString("item")!=null)
                                {
                                    fnewRow[5]=rs.getString("item")+"";
                                }
                            else
                                {
                                    fnewRow[5]="";
                                }
                            fnewRow[6]=rs.getString("preve")+" ";
                            if(rs.getString("pre_re")!=null)
                                {
                                    fnewRow[7]=rs.getString("pre_re");
                                    tprer+=(rs.getDouble("pre_re")-rs.getDouble("preve"))*rs.getDouble("exi");
                                    artreb+=1;
                                    exireb+=rs.getDouble("exi");
                                }
                            else
                                {
                                     if(rs.getFloat("descuento")>0)
                                        {
                                            fnewRow[7]=myForma.format(rs.getFloat("descuento"))+"%";
                                            descu+=((rs.getFloat("descuento")/100)*rs.getDouble("preve"))*rs.getDouble("exi");
                                            artpro+=1;
                                            exides+=rs.getDouble("exi");
                                        }
                                    else
                                        {
                                            fnewRow[7]="";
                                        }
                                }
                            fnewRow[8]=myForma.format(rs.getFloat("ultcos"));
                            fnewRow[9]=rs.getString("min");
                            fnewRow[10]=rs.getString("max");
                            fnewRow[11]=rs.getString("exib");
                            fnewRow[12]=rs.getString("exit");
                            fnewRow[13]=rs.getString("exi");
                            fnewRow[14]=myForma.format(rs.getDouble("ultcos")*rs.getDouble("exi"));
                            fnewRow[15]=rs.getString("fam")+"";
                            fnewRow[16]=rs.getString("viaje")+"";
                            fnewRow[17]=rs.getString("aux")+"";
                            if(this.jcbx_solonegativas.isSelected()==true)
                                {
                                    if(rs.getInt("exi")<0)
                                        {
                                            jtable_modelo_detallealmaayb.addRow(fnewRow);
                                        }
                                }
                            else
                                {
                                    jtable_modelo_detallealmaayb.addRow(fnewRow);
                                }

                            texi+=rs.getDouble("exi");

                            texit+=rs.getDouble("exit");
                            texib+=rs.getDouble("exib");

                            tcos+=rs.getDouble("ultcos")*rs.getDouble("exi");
                            tpre+=rs.getFloat("preve")*rs.getFloat("exi");

                    }
                }
            catch(Exception e)
                {
                    System.out.println(e.getMessage());
                }
            this.jtf_tiendaarti2.setText(""+jtable_modelo_detallealmaayb.getRowCount());
            fnewRow[0]=this.jtf_idtienda1.getText()+":"+this.jtf_idtiendades1.getText();
                            fnewRow[1]="";
                            fnewRow[2]="";
                            fnewRow[3]="";
                            fnewRow[4]="Totales";
                            fnewRow[5]="";
                            fnewRow[6]=myForma2.format(tpre);
                            fnewRow[7]=myForma2.format(tpre+tprer);
                            fnewRow[8]="";
                            fnewRow[9]="";
                            fnewRow[10]="";
                            fnewRow[11]="";
                            fnewRow[12]="";
                            fnewRow[13]=myForma2.format(texi);
                            fnewRow[14]=myForma2.format(tcos);
                            fnewRow[15]="";
                            //jtable_modelo_detallealma.addRow(fnewRow);
                            this.jtf_tiendabodega.setText(myForma2.format(texib));
                            this.jtf_tienda_piso.setText(myForma2.format(texit));

                            this.jtf_tiendat9.setText(myForma2.format(texi));
                            this.jtf_tiendat10.setText(myForma2.format(tcos));
                            this.jtf_tiendat11.setText(myForma2.format(tpre));
                            this.jtf_tiendat12.setText(myForma2.format(tprer*-1));
                            this.jtf_tiendat17.setText(myForma2.format(descu));
                            this.jtf_tiendat18.setText(myForma2.format((tpre+tprer)-descu));

                            this.jtf_tiendaarti3.setText(myForma2.format(artreb));
                            this.jtf_tiendaarti4.setText(myForma2.format(artpro));

                            this.jtf_tiendaarti5.setText(myForma2.format(exireb));
                            this.jtf_tiendaarti6.setText(myForma2.format(exides));

        }
private void carga_datos_detallealmacenbod(int opcion,String idtienda,int orden)
        {
            String texto="";
            while(jtable_modelo_detallealmab.getRowCount()>0)jtable_modelo_detallealmab.removeRow(0);

            texto="select * from x1sieuno_articulo_detalle_ventasacumv3(15,"+idtienda+",'','','"+orden+"') as (ida integer,min integer,max integer,exi double precision,idp integer,cod text,cndt integer,descor text,preve double precision,pre_re real,clavepro text,item text,premay real,ultcos numeric,fam character varying(30),descuento numeric)";

            System.out.println(texto);
            String despartido[]=null;
            Object[] fnewRow = new Object[14];
            DecimalFormat myFormad = new DecimalFormat("############");
            DecimalFormat myForma = new DecimalFormat("############.##");
            DecimalFormat myForma2 = new DecimalFormat("###,###,###,###.##");
             int artreb=0,artpro=0;
            double texi=0,tcos=0,tpre=0,tprer=0,descu=0,exireb=0,exides=0;
            try
               {
               rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
               while (rs.next())
                    {


                            despartido=rs.getString("descor").split(":");
                            fnewRow[0]=despartido[0]+":"+despartido[2];
                            fnewRow[1]=rs.getString ("idp");
                            fnewRow[2]=rs.getString ("clavepro");
                            fnewRow[3]=rs.getString ("cod");
                            fnewRow[4]=despartido[1];
                            if(rs.getString("item")!=null)
                                {
                                    fnewRow[5]=rs.getString("item")+"";

                                }
                            else
                                {
                                    fnewRow[5]="";
                                }
                            fnewRow[6]=rs.getString("preve")+" ";

                            if(rs.getString("pre_re")!=null)
                                {
                                    fnewRow[7]=rs.getString("pre_re")+"";
                                     tprer+=(rs.getDouble("pre_re")-rs.getDouble("preve"))*rs.getDouble("exi");
                                     artreb+=1;
                                     exireb+=rs.getDouble("exi");
                                }
                            else
                                {
                                   if(rs.getFloat("descuento")>0)
                                        {
                                            fnewRow[7]=myFormad.format(rs.getFloat("descuento"))+"%";
                                            descu+=((rs.getFloat("descuento")/100)*rs.getDouble("preve"))*rs.getDouble("exi");
                                            artpro+=1;
                                            exides+=rs.getDouble("exi");
                                        }
                                    else
                                    {
                                    fnewRow[7]="";
                                    }
                                }
                            fnewRow[8]=myForma.format(rs.getFloat("ultcos"));
                            fnewRow[9]=rs.getString("min")+"";
                            fnewRow[10]=rs.getString ("max")+"";
                            fnewRow[11]=rs.getString ("exi")+"";
                            fnewRow[12]=myForma.format(rs.getDouble("ultcos")*rs.getDouble("exi"));
                            fnewRow[13]=rs.getString ("fam");
                            if(this.jcbx_solonegativas.isSelected()==true)
                                {
                                    if(rs.getInt("exi")<0)
                                        {
                                            jtable_modelo_detallealmab.addRow(fnewRow);
                                        }
                                }
                            else
                                {
                                    jtable_modelo_detallealmab.addRow(fnewRow);
                                }
                            
                            texi+=rs.getDouble("exi");
                            tcos+=rs.getDouble("ultcos")*rs.getDouble("exi");
                            tpre+=rs.getDouble("preve")*rs.getDouble("exi");

                    }
                }
            catch(Exception e)
                {
                    System.out.println(e.getMessage());
                }
           this.jtf_tiendaarti1.setText(""+jtable_modelo_detallealmab.getRowCount());
            fnewRow[0]="";
                            fnewRow[1]="";
                            fnewRow[2]="";
                            fnewRow[3]="";
                            fnewRow[4]="Totales";
                            fnewRow[5]="";
                            fnewRow[6]=myForma2.format(tpre);
                            fnewRow[7]=myForma2.format(tpre+tprer);
                            fnewRow[8]="";
                            fnewRow[9]="";
                            fnewRow[10]="";
                            fnewRow[11]=myForma2.format(texi);
                            fnewRow[12]=myForma2.format(tcos);
                            fnewRow[13]="";
                           // jtable_modelo_detallealmab.addRow(fnewRow);
                            this.jtf_tiendat4.setText(myForma2.format(texi));
                            this.jtf_tiendat6.setText(myForma2.format(tcos));
                            this.jtf_tiendat7.setText(myForma2.format(tpre));
                            this.jtf_tiendat8.setText(myForma2.format(tprer*-1));
                            this.jtf_tiendat15.setText(myForma2.format(descu));
                            this.jtf_tiendat16.setText(myForma2.format((tpre+tprer)-descu));
                            this.jtf_articulosrebajados2.setText(myForma2.format(artreb));
                            this.jtf_articulosrebajados3.setText(myForma2.format(artpro));

                            this.jtf_articulosrebajados6.setText(myForma2.format(exireb));
                            this.jtf_articulosrebajados7.setText(myForma2.format(exides));

        }

private void carga_datos_detallealmacenrebaja(int opcion,String idtienda)
        {
            String texto="";

            while(jtable_modelo_detallealma.getRowCount()>0)jtable_modelo_detallealma.removeRow(0);
            
            texto="select * from x1sieuno_articulo_detalle_ventasacumv3("+opcion+","+idtienda+",'','','') as (ida integer,min integer,max integer,exi double precision,idp integer,cod text,cndt integer,descor text,preve double precision,pre_re real,clavepro text,item text,premay real,ultcos numeric,fam character varying(30))";
            System.out.println(texto);
            String despartido[]=null;
            Object[] fnewRow = new Object[14];
            DecimalFormat myForma = new DecimalFormat("############.##");
            DecimalFormat myForma2 = new DecimalFormat("###,###,###,###.##");
            double texi=0,tcos=0,tpre=0,tprer=0;
            try
               {
               rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
               while (rs.next())
                    {
                            despartido=rs.getString("descor").split(":");
                            fnewRow[0]=despartido[0]+":"+despartido[2];
                            fnewRow[1]=rs.getString ("idp");
                            fnewRow[2]=rs.getString ("clavepro");
                            fnewRow[3]=rs.getString ("cod");
                            fnewRow[4]=despartido[1];
                            if(rs.getString("item")!=null)
                                {
                                    fnewRow[5]=rs.getString("item")+"";
                                }
                            else
                                {
                                    fnewRow[5]="";
                                }
                            fnewRow[6]=rs.getString("preve")+" ";
                            if(rs.getString("pre_re")!=null)
                                {
                                    fnewRow[7]=rs.getString("pre_re")+"";
                                    tprer+=(rs.getFloat("pre_re")-rs.getFloat("preve"))*rs.getFloat("exi");
                                }
                            else
                                {
                                    fnewRow[7]="";
                                }
                            fnewRow[8]=myForma.format(rs.getFloat("ultcos"));
                            fnewRow[9]=rs.getString("min");
                            fnewRow[10]=rs.getString("max");
                            fnewRow[11]=rs.getString("exi");
                            fnewRow[12]=myForma.format(rs.getFloat("ultcos")*rs.getFloat("exi"));
                            fnewRow[13]=rs.getString("fam")+"";
                            jtable_modelo_detallealma.addRow(fnewRow);
                            texi+=rs.getDouble("exi");
                            tcos+=rs.getDouble("ultcos")*rs.getFloat("exi");
                            tpre+=rs.getDouble("preve")*rs.getFloat("exi");
                            

                    }
                }
            catch(Exception e)
                {
                    System.out.println(e.getMessage());
                }
            this.jtf_tiendaarti.setText(""+jtable_modelo_detallealma.getRowCount());
            fnewRow[0]=this.jtf_idtienda.getText()+":"+this.jtf_idtiendades.getText();
                            fnewRow[1]="";
                            fnewRow[2]="";
                            fnewRow[3]="";
                            fnewRow[4]="Totales";
                            fnewRow[5]="";
                            fnewRow[6]=myForma2.format(tpre);
                            fnewRow[7]=myForma2.format(tpre+tprer);
                            fnewRow[8]="";
                            fnewRow[9]="";
                            fnewRow[10]="";
                            fnewRow[11]=myForma2.format(texi);
                            fnewRow[12]=myForma2.format(tcos);
                            fnewRow[13]="";
                            //jtable_modelo_detallealma.addRow(fnewRow);
                            this.jtf_tiendat1.setText(myForma2.format(texi));
                            this.jtf_tiendat2.setText(myForma2.format(tcos));
                            this.jtf_tiendat3.setText(myForma2.format(tpre));
                            this.jtf_tiendat5.setText(myForma2.format(tpre+tprer));

        }


private void distribucionfotos()
    {
        int i=0;
        for( i=0;i<this.jtbl_articulosentiendas2.getRowCount();i++)
                {
                    jtbl_articulosentiendas2.setRowHeight(i, 140);
                    jtable_modelo_detallealmaayb.setValueAt("<html><head></head><body><p style=\"margin-top: 0\"><img src=\"http://"+variables_global.getHostfotos()+"/"+variables_global.getcarpetaaplicacion()+"/fotos/"+jtable_modelo_detallealmaayb.getValueAt(i, 2).toString()+".JPG\" width=\"180\" height=\"120\" border=\"0\" alt=\"Foto\"></img></p></body></html>",i,17

                            );
                }
    }

private void carga_datos_detallealmacenrebajabod(int opcion,String idtienda)
        {
            String texto="";

            while(jtable_modelo_detallealmab.getRowCount()>0)jtable_modelo_detallealmab.removeRow(0);

            texto="select * from x1sieuno_articulo_detalle_ventasacumv3("+opcion+","+idtienda+",'','','') as (ida integer,min integer,max integer,exi double precision,idp integer,cod text,cndt integer,descor text,preve double precision,pre_re real,clavepro text,item text,premay real,ultcos numeric,fam character varying(30))";
            System.out.println(texto);
            String despartido[]=null;
            Object[] fnewRow = new Object[14];
            DecimalFormat myForma = new DecimalFormat("############.##");
            DecimalFormat myForma2 = new DecimalFormat("###,###,###,###.##");
            double texi=0,tcos=0,tpre=0,tprer=0;
            try
               {
               rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
               while (rs.next())
                    {
                            despartido=rs.getString("descor").split(":");
                            fnewRow[0]=despartido[0]+":"+despartido[2];
                            fnewRow[1]=rs.getString ("idp");
                            fnewRow[2]=rs.getString ("clavepro");
                            fnewRow[3]=rs.getString ("cod");
                            fnewRow[4]=despartido[1];
                            if(rs.getString("item")!=null)
                                {
                                    fnewRow[5]=rs.getString("item")+"";
                                }
                            else
                                {
                                    fnewRow[5]="";
                                }
                            fnewRow[6]=rs.getString("preve")+" ";
                            if(rs.getString("pre_re")!=null)
                                {
                                    fnewRow[7]=rs.getString("pre_re")+"";
                                    tprer+=(rs.getFloat("pre_re")-rs.getFloat("preve"))*rs.getFloat("exi");
                                }
                            else
                                {
                                    fnewRow[7]="";
                                }
                            fnewRow[8]=myForma.format(rs.getFloat("ultcos"));
                            fnewRow[9]=rs.getString("min");
                            fnewRow[10]=rs.getString("max");
                            fnewRow[11]=rs.getString("exi");
                            fnewRow[12]=myForma.format(rs.getFloat("ultcos")*rs.getFloat("exi"));
                            fnewRow[13]=rs.getString("fam")+"";
                            jtable_modelo_detallealmab.addRow(fnewRow);
                            texi+=rs.getDouble("exi");
                            tcos+=rs.getDouble("ultcos")*rs.getFloat("exi");
                            tpre+=rs.getDouble("preve")*rs.getFloat("exi");


                    }
                }
            catch(Exception e)
                {
                    System.out.println(e.getMessage());
                }
            this.jtf_tiendaarti1.setText(""+jtable_modelo_detallealmab.getRowCount());
            fnewRow[0]=this.jtf_idtienda.getText()+":"+this.jtf_idtiendades.getText();
                            fnewRow[1]="";
                            fnewRow[2]="";
                            fnewRow[3]="";
                            fnewRow[4]="Totales";
                            fnewRow[5]="";
                            fnewRow[6]=myForma2.format(tpre);
                            fnewRow[7]=myForma2.format(tpre+tprer);
                            fnewRow[8]="";
                            fnewRow[9]="";
                            fnewRow[10]="";
                            fnewRow[11]=myForma2.format(texi);
                            fnewRow[12]=myForma2.format(tcos);
                            fnewRow[13]="";
                            //jtable_modelo_detallealma.addRow(fnewRow);
                            this.jtf_tiendat4.setText(myForma2.format(texi));
                            this.jtf_tiendat6.setText(myForma2.format(tcos));
                            this.jtf_tiendat7.setText(myForma2.format(tpre));
                            this.jtf_tiendat8.setText(myForma2.format(tpre+tprer));

        }
private void jlst_clientesdistribucionMouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
    }
private void jlst_clientesdistribucion1MouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
    }

private void jtbl_articulosentiendasMouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
    }
private void imprimir(int pag,float ptotal)
    {
     this.objimpresora=new com_distri_folios_imprimir();

     this.objimpresora.setOneItem_cadenas_a_imprimir("Moviemientos al Inventario");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Folio:"+this.jtf_movidfolio.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Fecha:"+this.jtf_movfecha.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Movimiento:"+this.jtf_movdescribe.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Almacen:"+this.jtf_movalmacen.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Total Piezas:"+this.jtf_piezasmov.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("pagina:"+ pag + " de "+ptotal+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Responsable Almacen: ______________");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Empaco: ______________");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Recibio: ______________");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
     this.objimpresora.setObjeto_tabla(jbt_catalogoalmacendetalle);
     this.objimpresora.imprimir_all(6,pag);
    }

private String  fechaeuropea(String fecha) {
         //resibe cadena de fecha en formato americano yyyy-MM-dd
        java.util.Date fechaestaeuropa=null;
       SimpleDateFormat formateadorestaeuropa = new SimpleDateFormat("dd-MM-yyyy");
       String cadenafecha="";
        try
         {
          fechaestaeuropa = formateadoresta.parse(fecha);
         }
        catch (ParseException e)
          {
             //Error, la cadena de texto no se puede convertir en fecha.
          }
       cadenafecha= formateadorestaeuropa.format(fechaestaeuropa);
       return cadenafecha;

    }

private String DiaSemana(String fe) {
         String dia = "";
       java.util.Date fecha=null;
         try
            {
             fecha = formateador.parse(fe);

           }
        catch (ParseException e)
            {
            //Error, la cadena de texto no se puede convertir en fecha.
            }
        Calendar cal= Calendar.getInstance();
        cal.setTime(fecha);
        //ojo para establecer o recetear cada parte de la fecha por separado
        //cal.set(Calendar.YEAR, fecha.getYear());
        //cal.set(Calendar.MONTH, fecha.getMonth());
        //cal.set(Calendar.DAY_OF_MONTH, fecha.getDay());
        int diaInt = cal.get(Calendar.DAY_OF_WEEK);
        switch (diaInt) {
            case 1:
                dia = "Domingo";
                break;
            case 2:
                dia = "Lunes";
                break;
            case 3:
                dia = "Martes";
                break;
            case 4:
                dia = "Miercoles";
                break;
            case 5:
                dia = "Jueves";
                break;
            case 6:
                dia = "Viernes";
                break;
            case 7:
                dia = "Sabado";
                break;

        }
        return dia;
    }
 private void exportar_archivo()
    {
        FileWriter fichero = null;
        PrintWriter pw = null;
        Object jtunidad=JOptionPane.showInputDialog(null,"Ingresa Unidad:","Unidades",JOptionPane.QUESTION_MESSAGE,null,new Object[] { "C", "D", "E","F","G","H" },"C");
        System.out.println("Esta es la Unidad:"+jtunidad.toString());
        String texto="select * from x1distribucion_terminados_articulos_catalogo(15,1,'') as (id character varying(16),idstatus smallint,statusdescribe character varying(40),describearticulo character varying(80),describcorta character varying(20),unsal character varying(3),unent character varying(3),facentruni numeric,uniempaque character varying(12),idtempo smallint,describetemp character varying(40),idfamilia character varying(5),familiadescribe character varying(40),controlalma character varying(20),stocminimo numeric,stocmaximo numeric,precio1 numeric,perecio2 numeric,precio3 numeric,precio4 numeric,precio5 numeric,ultimocosto numeric,costoprom numeric,pensurtir numeric,tiemposurtido smallint,acumprod numeric,acumimporte numeric,idtipoarticulo smallint,tipodescribe character varying(40),fechaprototipo date,fechaautoriza date,fechainiprod date,fechaultimaent date,usuario character varying(20),observacion character varying(255),idprovee character varying(12),nombrecreador character varying(80),valor_x character varying(20),valorx_st character varying(20),idpersonal character varying(16),nombrepersonal character varying(80),descripprovee character varying(60))",anterior="";
        try
        {
            fichero = new FileWriter(jtunidad.toString()+":/Existencia.csv");
            pw = new PrintWriter(fichero);
            try
                {
                    rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
                    while (rs.next())
                        {
                            if (!anterior.equals(rs.getString("id")))
                                {
                                    pw.println(rs.getString("id")+","+"."+","+rs.getString("describearticulo")+",0,"+rs.getString("precio5"));
                                        }
                            anterior=rs.getString("id").replace(" ", "");
                        }
                }
                catch(Exception e)
                    {
                        System.out.println(e.getMessage());
                    }

        } catch (Exception e) {
            e.printStackTrace();
        } finally {
           try {
           // Nuevamente aprovechamos el finally para
           // asegurarnos que se cierra el fichero.
           if (null != fichero)
              fichero.close();
                JOptionPane.showMessageDialog(null,"Archivo correcto "+jtunidad.toString()+":/Existencia.csv", "Sistema Integral(Catalogo de Articulos)",1);
           } catch (Exception e2) {
              e2.printStackTrace();
           }
        }
    }
 private void exportar_archivoxtienda()
    {
        FileWriter fichero = null;
        PrintWriter pw = null;
        Object jtunidad=JOptionPane.showInputDialog(null,"Ingresa Unidad:","Unidades",JOptionPane.QUESTION_MESSAGE,null,new Object[] { "C", "D", "E","F","G","H" },"C");
        System.out.println("Esta es la Unidad:"+jtunidad.toString());
        String texto="select * from x1distribucion_terminados_articulos_catalogo(15,1,'') as (id character varying(16),idstatus smallint,statusdescribe character varying(40),describearticulo character varying(80),describcorta character varying(20),unsal character varying(3),unent character varying(3),facentruni numeric,uniempaque character varying(12),idtempo smallint,describetemp character varying(40),idfamilia character varying(5),familiadescribe character varying(40),controlalma character varying(20),stocminimo numeric,stocmaximo numeric,precio1 numeric,perecio2 numeric,precio3 numeric,precio4 numeric,precio5 numeric,ultimocosto numeric,costoprom numeric,pensurtir numeric,tiemposurtido smallint,acumprod numeric,acumimporte numeric,idtipoarticulo smallint,tipodescribe character varying(40),fechaprototipo date,fechaautoriza date,fechainiprod date,fechaultimaent date,usuario character varying(20),observacion character varying(255),idprovee character varying(12),nombrecreador character varying(80),valor_x character varying(20),valorx_st character varying(20),idpersonal character varying(16),nombrepersonal character varying(80),descripprovee character varying(60))",anterior="";
        try
        {
            fichero = new FileWriter(jtunidad.toString()+":/Existencia_"+this.jtf_idtiendades.getText()+".csv");
            pw = new PrintWriter(fichero);
             pw.println("id,Clave,barra,descripcion,precio,Existencia");
                for(int ii=0;ii<this.jtable_modelo_detallealma.getRowCount();ii++)
                {
                     pw.println(this.jtable_modelo_detallealma.getValueAt(ii, 1).toString()+","+this.jtable_modelo_detallealma.getValueAt(ii, 2).toString()+","+this.jtable_modelo_detallealma.getValueAt(ii, 3).toString()+","+this.jtable_modelo_detallealma.getValueAt(ii, 4).toString().replace(",", "")+","+this.jtable_modelo_detallealma.getValueAt(ii, 6).toString()+","+this.jtable_modelo_detallealma.getValueAt(ii, 11).toString());
                }
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
           try {
           // Nuevamente aprovechamos el finally para
           // asegurarnos que se cierra el fichero.
           if (null != fichero)
              fichero.close();
                JOptionPane.showMessageDialog(null,"Archivo correcto "+jtunidad.toString()+":/Existencia_"+this.jtf_idtiendades.getText()+".csv", "Sistema Integral(Catalogo de Articulos)",1);
           } catch (Exception e2) {
              e2.printStackTrace();
           }
        }
    }

 private void datos_aplicarcambios(int opcion)
 {
     //limpiar la tabla
  int numerofilas = this.jtable_modelo_alm_updatereplace.getRowCount(),ii=0,confirma=0;
String selectin="";
        for( ii=0;ii<numerofilas;ii++)
                {
                if (ii>0)
                    {
                        selectin+=".";
                    }
                selectin+=""+jtable_modelo_alm_updatereplace.getValueAt(ii ,2)+"";
                }

    System.out.println(selectin);
   String texto="select * from x1distribucion_terminados_articulos_actualiza("+opcion+",'','1','VALLERINA BLOOM','VALLERINA BLOOM','CREVA0111M07','PZ','PZ','1','','1','1','K','0','CRE','0','0','11.89','11.89','11.89','11.89','30','11.89','11.89','0','CRE','0','','"+this.jtf_textoactualizar.getText().toUpperCase().trim()+"','','"+selectin+"')";
    System.out.println(texto);
    try
         {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                     confirma=rs.getInt(1);
                }
        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }
       if (confirma==1)
              {
                JOptionPane.showMessageDialog(null,"Gracias datos Actualizados Correctamente", "Sistema Integral Insumos",1);
                while(jtable_modelo_alm_updatereplace.getRowCount()>0)jtable_modelo_alm_updatereplace.removeRow(0);
                this.jtf_busqueda.requestFocus();
              }
         else
              {
                JOptionPane.showMessageDialog(null,"Error Consulte con Su Administrador", "Sistema Integral Insumos",1);
              }
 }

private void carga_datos_fotospaginacion(int pagina)
    {
        textohtml="";
        int nif=0,pag=pagina,nobjetotabla=this.jtable_modelo_almacen.getRowCount(),nip=0,ni=0,fila=0,artxpag=Integer.valueOf(this.jtf_fotosartxpag.getText());
        float totalpaginas=this.jtable_modelo_almacen.getRowCount()/artxpag;
        this.jlbl_paginas.setText("PAGINAS :"+totalpaginas);
             nif=((pag+1)*artxpag);
             nip=((pag)*artxpag);
                        if (nif < nobjetotabla )
                            {
                                nobjetotabla=nif;
                            }
  System.out.println("tOTAL FILAS:"+this.jtable_modelo_almacen.getRowCount()+" PAGINA ACTUAL "+pagina+" filainicial "+ nip + " Fila Final"+ nobjetotabla);
                    /*Impresion de los productos*/
                        for(ni=nip;ni<nobjetotabla;ni++)
                        {
                            System.out.println(" fila Actual "+ ni );
                                if (fila<=0)
                                    {
                                    	textohtml+= "<tr>";
                                    }
                                    fila++;
                                    textohtml+="<th>"+jtable_modelo_almacen.getValueAt(ni, 2).toString()+"<br>"+jtable_modelo_almacen.getValueAt(ni, 3).toString() + " $"+jtable_modelo_almacen.getValueAt(ni, 7).toString()+ "<br>"+"<img src=\"http://"+variables_global.getHostfotos()+"/"+variables_global.getcarpetaaplicacion()+"/fotos/"+jtable_modelo_almacen.getValueAt(ni, 2).toString()+".JPG\" width=230 height=190 border=0 alt=\"Foto Articulo\" />"+"</th>";
                                 if (fila>=4)
                                    {
                                        textohtml+= "</tr>";
                                        fila=0;
                                    }
                        }
         this.jepn_fotos.setText("<html><head></head><body><table>"+textohtml+"</table></body></html>");
         System.out.println(" este es html "+ textohtml );
    }

private void crearetiqueta()
    {
        FileWriter fichero = null;
        PrintWriter pw = null;
        //Object jtunidad=JOptionPane.showInputDialog(null,"Ingresa Unidad:","Unidades",JOptionPane.QUESTION_MESSAGE,null,new Object[] { "C", "D", "E","F","G","H" },"C");
        String texto="",anterior="";
        try
        {
            fichero = new FileWriter(this.jtf_unidad.getText()+":/etiqetas8.csv");
            pw = new PrintWriter(fichero);
            pw.println("codigo,barra,descripcion,item,precio,cantidad");
                for(int ii=0;ii<this.jtable_modelo_almacen.getRowCount();ii++)
                {
                        if(this.jtable_modelo_almacen.getValueAt(ii, 4).toString().length()==8)
                            {
                                texto=this.jtable_modelo_almacen.getValueAt(ii, 4).toString().substring(0, 7);
                            }
                        else
                            {
                                texto=this.jtable_modelo_almacen.getValueAt(ii, 4).toString();
                            }
                        pw.println(this.jtable_modelo_almacen.getValueAt(ii, 2).toString()+","+texto+","+this.jtable_modelo_almacen.getValueAt(ii, 3).toString()+","+this.jtable_modelo_almacen.getValueAt(ii, 5).toString()+","+this.jtable_modelo_almacen.getValueAt(ii, 7).toString()+","+this.jtable_modelo_almacen.getValueAt(ii, 9).toString());

                }

        } catch (Exception e) {
            e.printStackTrace();
        } finally {
           try {
           // Nuevamente aprovechamos el finally para
           // asegurarnos que se cierra el fichero.
           if (null != fichero)
              fichero.close();
                //while(jtable_modelo_etiq.getRowCount()>0)jtable_modelo_etiq.removeRow(0);
                JOptionPane.showMessageDialog(null,"Archivo correcto "+this.jtf_unidad.getText()+":/etiqueta8.csv", "Sistema Integral(Catalogo de Articulos)",1);
           } catch (Exception e2) {
              e2.printStackTrace();
           }
        }
    }


  private void imprimirinventario(int pag,float ptotal)
    {
    this.objimpresora2=new articulos_sie_invefisico_imprimir();
    java.util.Date fechahoya=new Date();
     this.objimpresora2.setOneItem_cadenas_a_imprimir(" S.I. Reporte de Inventarios en "+this.jtf_idtiendades.getText());
     this.objimpresora2.setOneItem_cadenas_a_imprimir("Titulo Reporte:"+this.jtf_busqueda1.getText()+"");
     this.objimpresora2.setOneItem_cadenas_a_imprimir("Fecha Impresion:"+this.fechaeuropea(fechahoya)+" Hora: "+fechahoya.getHours()+":"+fechahoya.getMinutes()+" Usuario:"+variables_global.getNombre());
     this.objimpresora2.setOneItem_cadenas_a_imprimir("*");
//     this.objimpresora.setOneItem_cadenas_a_imprimir("Total Piezas:"+this.jtf_totalpiezas.getText()+"");
this.objimpresora2.setOneItem_cadenas_a_imprimir("paginas:"+ pag + " de "+ptotal+"");
if((pag+1)>=ptotal)
        {
                this.objimpresora2.setOneItem_cadenas_a_imprimir("    Total de Articulos:"+this.jtf_tiendaarti.getText()+"   Articulos con Precio de Rebaja:"+this.jtf_articulosrebajados.getText()+" Artculos con % descuento:"+this.jtf_articulosrebajados1.getText());
                this.objimpresora2.setOneItem_cadenas_a_imprimir("    Total de Existencia:"+this.jtf_tiendat1.getText()+"   Existencia con Precio de Rebaja:"+this.jtf_articulosrebajados4.getText()+" Existencia con % descuento:"+this.jtf_articulosrebajados5.getText());
                this.objimpresora2.setOneItem_cadenas_a_imprimir("    Total Costo:"+this.jtf_tiendat2.getText());
                this.objimpresora2.setOneItem_cadenas_a_imprimir("    Total Precio:"+this.jtf_tiendat3.getText() +" Importe de perdida por rebajas:"+this.jtf_tiendat5.getText()+"   Imp. de Perd. por Descuento:"+this.jtf_tiendat13.getText());
                this.objimpresora2.setOneItem_cadenas_a_imprimir("    Valor de Inv. c/promocion:"+this.jtf_tiendat14.getText());
        }

     this.objimpresora2.setOneItem_cadenas_a_imprimir("..");

     this.objimpresora2.setOneItem_cadenas_a_imprimir("*");
     this.objimpresora2.setObjeto_tabla(jtbl_articulosentiendas);
     this.objimpresora2.imprimir_all(9,pag);
    }
private void imprimirinventariosc(int pag,float ptotal)
    {
    this.objimpresora2=new articulos_sie_invefisico_imprimir();
    java.util.Date fechahoya=new Date();
     this.objimpresora2.setOneItem_cadenas_a_imprimir(" S.I. Reporte de Inventarios en "+this.jtf_idtiendades.getText());
     this.objimpresora2.setOneItem_cadenas_a_imprimir("Titulo Reporte:"+this.jtf_busqueda1.getText()+"");
     this.objimpresora2.setOneItem_cadenas_a_imprimir("Fecha Impresion:"+this.fechaeuropea(fechahoya)+" Hora: "+fechahoya.getHours()+":"+fechahoya.getMinutes()+" Usuario:"+variables_global.getNombre());
     this.objimpresora2.setOneItem_cadenas_a_imprimir("*");
//     this.objimpresora.setOneItem_cadenas_a_imprimir("Total Piezas:"+this.jtf_totalpiezas.getText()+"");
this.objimpresora2.setOneItem_cadenas_a_imprimir("paginas:"+ pag + " de "+ptotal+"");
if((pag+1)>=ptotal)
        {
                this.objimpresora2.setOneItem_cadenas_a_imprimir("Total de Articulos:"+this.jtf_tiendaarti.getText());
                this.objimpresora2.setOneItem_cadenas_a_imprimir("Total de Existencia:"+this.jtf_tiendat1.getText());
                //this.objimpresora2.setOneItem_cadenas_a_imprimir("Total Costo:"+this.jtf_tiendat2.getText());
                //this.objimpresora2.setOneItem_cadenas_a_imprimir("Total Precio:"+this.jtf_tiendat3.getText());
                //this.objimpresora2.setOneItem_cadenas_a_imprimir("Total Precio Rebaja:"+this.jtf_tiendat5.getText());
        }

     this.objimpresora2.setOneItem_cadenas_a_imprimir("..");

     this.objimpresora2.setOneItem_cadenas_a_imprimir("*");
     this.objimpresora2.setObjeto_tabla(jtbl_articulosentiendas);
     this.objimpresora2.imprimir_all(10,pag);
    }
private void imprimirinventariob(int pag,float ptotal)
    {
    this.objimpresora2=new articulos_sie_invefisico_imprimir();
    java.util.Date fechahoya=new Date();
     this.objimpresora2.setOneItem_cadenas_a_imprimir(" S.I. Reporte de Inventarios en "+this.jtf_idtiendades.getText());
     this.objimpresora2.setOneItem_cadenas_a_imprimir("Titulo Reporte:"+this.jtf_busqueda2.getText()+"");
     this.objimpresora2.setOneItem_cadenas_a_imprimir("Fecha Impresion:"+this.fechaeuropea(fechahoya)+" Hora: "+fechahoya.getHours()+":"+fechahoya.getMinutes()+" Usuario:"+variables_global.getNombre());
     this.objimpresora2.setOneItem_cadenas_a_imprimir("*");
//     this.objimpresora.setOneItem_cadenas_a_imprimir("Total Piezas:"+this.jtf_totalpiezas.getText()+"");
this.objimpresora2.setOneItem_cadenas_a_imprimir("paginas:"+ pag + " de "+ptotal+"");
if((pag+1)>=ptotal)
        {
                this.objimpresora2.setOneItem_cadenas_a_imprimir("   Total de Articulos:"+this.jtf_tiendaarti1.getText()+"   Articulos con Precio de Rebaja:"+this.jtf_articulosrebajados2.getText()+" Artculos con % descuento:"+this.jtf_articulosrebajados3.getText());
                this.objimpresora2.setOneItem_cadenas_a_imprimir("   Total de Existencia:"+this.jtf_tiendat4.getText()+"   Existencia con Precio de Rebaja:"+this.jtf_articulosrebajados6.getText()+" Existencia con % descuento:"+this.jtf_articulosrebajados7.getText());
                this.objimpresora2.setOneItem_cadenas_a_imprimir("   Total Costo:"+this.jtf_tiendat6.getText());
                this.objimpresora2.setOneItem_cadenas_a_imprimir("   Total Precio:"+this.jtf_tiendat7.getText() +" Importe de perdidas por Rebajas:"+this.jtf_tiendat8.getText()+"   Imp. de perdida por descuento:"+this.jtf_tiendat15.getText());
                this.objimpresora2.setOneItem_cadenas_a_imprimir("   Valor de inv. c/promocion:"+this.jtf_tiendat16.getText());
        }

     this.objimpresora2.setOneItem_cadenas_a_imprimir("..");

     this.objimpresora2.setOneItem_cadenas_a_imprimir("*");
     this.objimpresora2.setObjeto_tabla(jtbl_articulosentiendas1);
     this.objimpresora2.imprimir_all(9,pag);
    }
private void imprimirinventariobsc(int pag,float ptotal)
    {
    this.objimpresora2=new articulos_sie_invefisico_imprimir();
    java.util.Date fechahoya=new Date();
     this.objimpresora2.setOneItem_cadenas_a_imprimir(" S.I. Reporte de Inventarios en "+this.jtf_idtiendades.getText());
     this.objimpresora2.setOneItem_cadenas_a_imprimir("Titulo Reporte:"+this.jtf_busqueda2.getText()+"");
     this.objimpresora2.setOneItem_cadenas_a_imprimir("Fecha Impresion:"+this.fechaeuropea(fechahoya)+" Hora: "+fechahoya.getHours()+":"+fechahoya.getMinutes()+" Usuario:"+variables_global.getNombre());
     this.objimpresora2.setOneItem_cadenas_a_imprimir("*");
//     this.objimpresora.setOneItem_cadenas_a_imprimir("Total Piezas:"+this.jtf_totalpiezas.getText()+"");
this.objimpresora2.setOneItem_cadenas_a_imprimir("paginas:"+ pag + " de "+ptotal+"");
if((pag+1)>=ptotal)
        {
                this.objimpresora2.setOneItem_cadenas_a_imprimir("Total de Articulos:"+this.jtf_tiendaarti1.getText());
                this.objimpresora2.setOneItem_cadenas_a_imprimir("Total de Existencia:"+this.jtf_tiendat4.getText());
                //this.objimpresora2.setOneItem_cadenas_a_imprimir("Total Costo:"+this.jtf_tiendat6.getText());
                this.objimpresora2.setOneItem_cadenas_a_imprimir("Total Precio:"+this.jtf_tiendat7.getText());
                //this.objimpresora2.setOneItem_cadenas_a_imprimir("Total Precio Rebaja:"+this.jtf_tiendat8.getText());
        }

     this.objimpresora2.setOneItem_cadenas_a_imprimir("..");

     this.objimpresora2.setOneItem_cadenas_a_imprimir("*");
     this.objimpresora2.setObjeto_tabla(jtbl_articulosentiendas1);
     this.objimpresora2.imprimir_all(10,pag);
    }

 private void imprimirinventariogen(int pag,float ptotal)
    {
    this.objimpresora2=new articulos_sie_invefisico_imprimir();
    java.util.Date fechahoya=new Date();
     this.objimpresora2.setOneItem_cadenas_a_imprimir(" S.I. Reporte de Inventarios en "+this.jtf_idtiendades.getText());
     this.objimpresora2.setOneItem_cadenas_a_imprimir("Titulo Reporte:"+this.jtf_busqueda3.getText()+"");
     this.objimpresora2.setOneItem_cadenas_a_imprimir("Fecha Impresion:"+this.fechaeuropea(fechahoya)+" Hora: "+fechahoya.getHours()+":"+fechahoya.getMinutes()+" Usuario:"+variables_global.getNombre());
     this.objimpresora2.setOneItem_cadenas_a_imprimir("*");
//     this.objimpresora.setOneItem_cadenas_a_imprimir("Total Piezas:"+this.jtf_totalpiezas.getText()+"");
this.objimpresora2.setOneItem_cadenas_a_imprimir("paginas:"+ pag + " de "+ptotal+"");
if((pag+1)>=ptotal)
        {
                this.objimpresora2.setOneItem_cadenas_a_imprimir("        Total de Articulos:"+this.jtf_tiendaarti2.getText()+"   Articulos con Precio de Rebaja:"+this.jtf_tiendaarti3.getText()+" Artculos con % Descuento:"+this.jtf_tiendaarti4.getText());
                this.objimpresora2.setOneItem_cadenas_a_imprimir("        Total de Existencia:"+this.jtf_tiendat9.getText()+"   Existencia con Precio de Rebaja:"+this.jtf_tiendaarti5.getText()+" Existencia con % descuento:"+this.jtf_tiendaarti6.getText());
                this.objimpresora2.setOneItem_cadenas_a_imprimir("        Total Costo:"+this.jtf_tiendat10.getText());
                this.objimpresora2.setOneItem_cadenas_a_imprimir("        Total Precio:"+this.jtf_tiendat11.getText()  +" Importe Perdida:"+this.jtf_tiendat12.getText()+"   Imp. de Perdida por Descuento:"+this.jtf_tiendat17.getText());
                this.objimpresora2.setOneItem_cadenas_a_imprimir("        Valor de inv. c/promocion:"+this.jtf_tiendat18.getText());
        }

     this.objimpresora2.setOneItem_cadenas_a_imprimir("..");

     this.objimpresora2.setOneItem_cadenas_a_imprimir("*");
     this.objimpresora2.setObjeto_tabla(jtbl_articulosentiendas2);
     this.objimpresora2.imprimir_all(12,pag);
    }
private void imprimirinventariogensc(int pag,float ptotal)
    {
    this.objimpresora2=new articulos_sie_invefisico_imprimir();
    java.util.Date fechahoya=new Date();
     this.objimpresora2.setOneItem_cadenas_a_imprimir(" S.I. Reporte de Inventarios en "+this.jtf_idtiendades.getText());
     this.objimpresora2.setOneItem_cadenas_a_imprimir("Titulo Reporte:"+this.jtf_busqueda3.getText()+"");
     this.objimpresora2.setOneItem_cadenas_a_imprimir("Fecha Impresion:"+this.fechaeuropea(fechahoya)+" Hora: "+fechahoya.getHours()+":"+fechahoya.getMinutes()+" Usuario:"+variables_global.getNombre());
     this.objimpresora2.setOneItem_cadenas_a_imprimir("*");
//     this.objimpresora.setOneItem_cadenas_a_imprimir("Total Piezas:"+this.jtf_totalpiezas.getText()+"");
this.objimpresora2.setOneItem_cadenas_a_imprimir("paginas:"+ pag + " de "+ptotal+"");
if((pag+1)>=ptotal)
        {
                this.objimpresora2.setOneItem_cadenas_a_imprimir("Total de Articulos:"+this.jtf_tiendaarti2.getText());
                this.objimpresora2.setOneItem_cadenas_a_imprimir("Total de Existencia:"+this.jtf_tiendat9.getText());
                this.objimpresora2.setOneItem_cadenas_a_imprimir("Total Costo:"+this.jtf_tiendat10.getText());
                this.objimpresora2.setOneItem_cadenas_a_imprimir("Total Precio:"+this.jtf_tiendat11.getText());
                this.objimpresora2.setOneItem_cadenas_a_imprimir("Total Precio Rebaja:"+this.jtf_tiendat12.getText());
        }

     this.objimpresora2.setOneItem_cadenas_a_imprimir("..");

     this.objimpresora2.setOneItem_cadenas_a_imprimir("*");
     this.objimpresora2.setObjeto_tabla(jtbl_articulosentiendas2);
     this.objimpresora2.imprimir_all(11,pag);
    }
private String  fechaeuropea(Date fecha) {
       SimpleDateFormat formateadorestaeuropa = new SimpleDateFormat("dd-MM-yyyy");
       String cadenafecha="";

       cadenafecha= formateadorestaeuropa.format(fecha);
       return cadenafecha;
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        buttonGroup2 = new javax.swing.ButtonGroup();
        buttonGroup3 = new javax.swing.ButtonGroup();
        buttonGroup4 = new javax.swing.ButtonGroup();
        buttonGroup5 = new javax.swing.ButtonGroup();
        jPanel2 = new javax.swing.JPanel();
        jrb_bclave = new javax.swing.JRadioButton();
        jrb_bdescrip = new javax.swing.JRadioButton();
        jtf_busqueda = new javax.swing.JTextField();
        jbtn_buscar = new javax.swing.JButton();
        jrb_bitem = new javax.swing.JRadioButton();
        jrb_bprecio = new javax.swing.JRadioButton();
        jrb_obexacto = new javax.swing.JRadioButton();
        jrb_obcomienza = new javax.swing.JRadioButton();
        jrb_obaniway = new javax.swing.JRadioButton();
        jrb_bidfam = new javax.swing.JRadioButton();
        jrb_bidsubfam = new javax.swing.JRadioButton();
        jrb_bdessubfam = new javax.swing.JRadioButton();
        jcbx_verexistenciasad = new javax.swing.JCheckBox();
        jrb_lugaralmacen = new javax.swing.JRadioButton();
        jPanel6 = new javax.swing.JPanel();
        jbtn_salir = new javax.swing.JButton();
        jbtn_movimientosalmacen = new javax.swing.JButton();
        jtb_inveprogramados = new javax.swing.JButton();
        jbtn_generorequisicion = new javax.swing.JButton();
        jbtn_agregarterminado = new javax.swing.JButton();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel3 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jtb_almacen_catalogo = new javax.swing.JTable()
        {
            public boolean isCellEditable(int rowIndex, int mColIndex) {
                return false;
            }
        }
        ;
        jlbl_textobuscado = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jlbl_cantidadregistros = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jPanel4 = new javax.swing.JPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        jtb_almacen_proveedor = new javax.swing.JTable()
        {
            public boolean isCellEditable(int rowIndex, int mColIndex) {
                return false;
            }
        }
        ;
        jPanel5 = new javax.swing.JPanel();
        jScrollPane3 = new javax.swing.JScrollPane();
        jtb_almacen_familias = new javax.swing.JTable()
        {
            public boolean isCellEditable(int rowIndex, int mColIndex) {
                return false;
            }
        }
        ;
        jScrollPane9 = new javax.swing.JScrollPane();
        jep_articuloimagen = new javax.swing.JEditorPane();
        jPanel1 = new javax.swing.JPanel();
        jScrollPane4 = new javax.swing.JScrollPane();
        jtb_almacen_control = new javax.swing.JTable()
        {
            public boolean isCellEditable(int rowIndex, int mColIndex) {
                return false;
            }
        }
        ;
        jLabel6 = new javax.swing.JLabel();
        jlbl_cantidadregistros1 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jbtn_generaeti = new javax.swing.JButton();
        jLabel15 = new javax.swing.JLabel();
        jtf_unidad = new javax.swing.JTextField();
        jLabel19 = new javax.swing.JLabel();
        jtf_cantidadeti = new javax.swing.JTextField();
        jPanel7 = new javax.swing.JPanel();
        jScrollPane5 = new javax.swing.JScrollPane();
        jepn_fotos = new javax.swing.JEditorPane();
        jlbl_paginas = new javax.swing.JLabel();
        jbtn_anterior = new javax.swing.JButton();
        jtf_paginaactual = new javax.swing.JTextField();
        jbtn_siguiente = new javax.swing.JButton();
        jtf_fotosartxpag = new javax.swing.JTextField();
        jPanel8 = new javax.swing.JPanel();
        jScrollPane6 = new javax.swing.JScrollPane();
        jbt_catalogoalmacen = new javax.swing.JTable(){
            public boolean isCellEditable(int rowIndex, int mColIndex) {
                return false;
            }
        };
        jScrollPane7 = new javax.swing.JScrollPane();
        jbt_catalogoalmacendetalle = new javax.swing.JTable(){
            public boolean isCellEditable(int rowIndex, int mColIndex) {
                return false;
            }
        };
        jLabel9 = new javax.swing.JLabel();
        jtf_movidfolio = new javax.swing.JTextField();
        jLabel12 = new javax.swing.JLabel();
        jtf_movfecha = new javax.swing.JTextField();
        jLabel10 = new javax.swing.JLabel();
        jtf_movdescribe = new javax.swing.JTextField();
        jLabel11 = new javax.swing.JLabel();
        jtf_movalmacen = new javax.swing.JTextField();
        jLabel13 = new javax.swing.JLabel();
        jtf_piezasmov = new javax.swing.JTextField();
        jbtn_Imprimir = new javax.swing.JButton();
        jPanel9 = new javax.swing.JPanel();
        jScrollPane8 = new javax.swing.JScrollPane();
        jlst_clientesdistribucion = new javax.swing.JList();
        jLabel1 = new javax.swing.JLabel();
        jScrollPane12 = new javax.swing.JScrollPane();
        jtbl_articulosentiendas = new javax.swing.JTable(){
            public boolean isCellEditable(int rowIndex, int mColIndex) {
                return false;
            }}
            ;
            jtf_idtienda = new javax.swing.JTextField();
            jtf_idtiendades = new javax.swing.JTextField();
            jcbx_solonegativas = new javax.swing.JCheckBox();
            jlbl_articulos = new javax.swing.JLabel();
            jcbx_solonegativas1 = new javax.swing.JCheckBox();
            jButton2 = new javax.swing.JButton();
            jtf_pagini = new javax.swing.JTextField();
            jtf_pagfin = new javax.swing.JTextField();
            jtf_busqueda1 = new javax.swing.JTextField();
            jScrollPane14 = new javax.swing.JScrollPane();
            jtbl_articulosentiendas1 = new javax.swing.JTable(){
                public boolean isCellEditable(int rowIndex, int mColIndex) {
                    return false;
                }}
                ;
                jlbl_articulos1 = new javax.swing.JLabel();
                jtf_tiendat1 = new javax.swing.JTextField();
                jLabel16 = new javax.swing.JLabel();
                jLabel17 = new javax.swing.JLabel();
                jtf_tiendat2 = new javax.swing.JTextField();
                jLabel18 = new javax.swing.JLabel();
                jtf_tiendat3 = new javax.swing.JTextField();
                jLabel20 = new javax.swing.JLabel();
                jtf_tiendat5 = new javax.swing.JTextField();
                jLabel21 = new javax.swing.JLabel();
                jtf_tiendat4 = new javax.swing.JTextField();
                jLabel22 = new javax.swing.JLabel();
                jtf_tiendat6 = new javax.swing.JTextField();
                jLabel23 = new javax.swing.JLabel();
                jtf_tiendat7 = new javax.swing.JTextField();
                jLabel24 = new javax.swing.JLabel();
                jtf_tiendat8 = new javax.swing.JTextField();
                jtf_tiendaarti = new javax.swing.JTextField();
                jtf_tiendaarti1 = new javax.swing.JTextField();
                jcbx_solonegativas2 = new javax.swing.JCheckBox();
                jLabel25 = new javax.swing.JLabel();
                jrbt_tiendaid = new javax.swing.JRadioButton();
                jrbtn_tiendaclave = new javax.swing.JRadioButton();
                jtf_busqueda2 = new javax.swing.JTextField();
                jtf_pagini1 = new javax.swing.JTextField();
                jtf_pagfin1 = new javax.swing.JTextField();
                jButton4 = new javax.swing.JButton();
                jLabel31 = new javax.swing.JLabel();
                jtf_tiendat13 = new javax.swing.JTextField();
                jLabel32 = new javax.swing.JLabel();
                jtf_tiendat14 = new javax.swing.JTextField();
                jLabel33 = new javax.swing.JLabel();
                jtf_tiendat15 = new javax.swing.JTextField();
                jLabel34 = new javax.swing.JLabel();
                jtf_tiendat16 = new javax.swing.JTextField();
                jlbl_articulos3 = new javax.swing.JLabel();
                jtf_articulosrebajados = new javax.swing.JTextField();
                jtf_articulosrebajados1 = new javax.swing.JTextField();
                jtf_articulosrebajados2 = new javax.swing.JTextField();
                jtf_articulosrebajados3 = new javax.swing.JTextField();
                jtf_articulosrebajados4 = new javax.swing.JTextField();
                jtf_articulosrebajados5 = new javax.swing.JTextField();
                jtf_articulosrebajados6 = new javax.swing.JTextField();
                jtf_articulosrebajados7 = new javax.swing.JTextField();
                jrbt_tiendaid1 = new javax.swing.JRadioButton();
                jPanel10 = new javax.swing.JPanel();
                jPanel11 = new javax.swing.JPanel();
                jScrollPane10 = new javax.swing.JScrollPane();
                jtb_almacen_actualiza = new javax.swing.JTable()
                {
                    public boolean isCellEditable(int rowIndex, int mColIndex) {
                        return false;
                    }
                }
                ;
                jScrollPane11 = new javax.swing.JScrollPane();
                jtb_almacen_replace = new javax.swing.JTable()
                {
                    public boolean isCellEditable(int rowIndex, int mColIndex) {
                        return false;
                    }
                }
                ;
                jLabel2 = new javax.swing.JLabel();
                jtf_textoactualizar = new javax.swing.JTextField();
                jLabel14 = new javax.swing.JLabel();
                jRadioButton1 = new javax.swing.JRadioButton();
                jchbx_agregarregistros = new javax.swing.JCheckBox();
                jbtn_cambiosaplicar = new javax.swing.JButton();
                jScrollPane13 = new javax.swing.JScrollPane();
                jta_archivo = new javax.swing.JEditorPane();
                jButton1 = new javax.swing.JButton();
                jRadioButton2 = new javax.swing.JRadioButton();
                jPanel12 = new javax.swing.JPanel();
                jPanel13 = new javax.swing.JPanel();
                jtf_idtiendades1 = new javax.swing.JTextField();
                jtf_idtienda1 = new javax.swing.JTextField();
                jLabel26 = new javax.swing.JLabel();
                jScrollPane15 = new javax.swing.JScrollPane();
                jlst_clientesdistribucion1 = new javax.swing.JList();
                jScrollPane16 = new javax.swing.JScrollPane();
                jtbl_articulosentiendas2 = new javax.swing.JTable(){
                    public boolean isCellEditable(int rowIndex, int mColIndex) {
                        return false;
                    }}
                    ;
                    jlbl_articulos2 = new javax.swing.JLabel();
                    jtf_tiendaarti2 = new javax.swing.JTextField();
                    jLabel27 = new javax.swing.JLabel();
                    jtf_tiendat9 = new javax.swing.JTextField();
                    jLabel28 = new javax.swing.JLabel();
                    jtf_tiendat10 = new javax.swing.JTextField();
                    jLabel29 = new javax.swing.JLabel();
                    jtf_tiendat11 = new javax.swing.JTextField();
                    jLabel30 = new javax.swing.JLabel();
                    jtf_tiendat12 = new javax.swing.JTextField();
                    jtf_tiendabodega = new javax.swing.JTextField();
                    jtf_tienda_piso = new javax.swing.JTextField();
                    jButton5 = new javax.swing.JButton();
                    jtf_busqueda3 = new javax.swing.JTextField();
                    jtf_pagini2 = new javax.swing.JTextField();
                    jtf_pagfin2 = new javax.swing.JTextField();
                    jcbx_solonegativas4 = new javax.swing.JCheckBox();
                    jLabel35 = new javax.swing.JLabel();
                    jtf_tiendat17 = new javax.swing.JTextField();
                    jLabel36 = new javax.swing.JLabel();
                    jtf_tiendat18 = new javax.swing.JTextField();
                    jtf_tiendaarti3 = new javax.swing.JTextField();
                    jtf_tiendaarti4 = new javax.swing.JTextField();
                    jtf_tiendaarti5 = new javax.swing.JTextField();
                    jtf_tiendaarti6 = new javax.swing.JTextField();
                    jcbx_solonegativas5 = new javax.swing.JCheckBox();
                    jPanel14 = new javax.swing.JPanel();
                    jPanel15 = new javax.swing.JPanel();
                    jScrollPane18 = new javax.swing.JScrollPane();
                    jtbl_articulosentiendas3 = new javax.swing.JTable(){
                        public boolean isCellEditable(int rowIndex, int mColIndex) {
                            return false;
                        }}
                        ;
                        jScrollPane17 = new javax.swing.JScrollPane();
                        jlst_clientesdistribucion2 = new javax.swing.JList();
                        jtf_busqueda4 = new javax.swing.JTextField();
                        jtf_idtienda2 = new javax.swing.JTextField();
                        jtf_idtiendades2 = new javax.swing.JTextField();
                        jrbtn_aybvigencia = new javax.swing.JRadioButton();
                        jrbtn_aybvigencia1 = new javax.swing.JRadioButton();
                        jrbtn_aybvigencia2 = new javax.swing.JRadioButton();
                        jrbtn_aybvigencia3 = new javax.swing.JRadioButton();
                        jtf_articulosvigentes = new javax.swing.JTextField();
                        jLabel37 = new javax.swing.JLabel();
                        jPanel16 = new javax.swing.JPanel();
                        jPanel17 = new javax.swing.JPanel();
                        jButton3 = new javax.swing.JButton();
                        jLabel38 = new javax.swing.JLabel();
                        jdc_fechainicio = new com.toedter.calendar.JDateChooser();
                        jScrollPane19 = new javax.swing.JScrollPane();
                        jtbl_articulosentiendas4 = new javax.swing.JTable(){
                            public boolean isCellEditable(int rowIndex, int mColIndex) {
                                return false;
                            }}
                            ;
                            jtf_idtiendahistorico = new javax.swing.JTextField();
                            jtf_idtiendades3 = new javax.swing.JTextField();
                            jButton6 = new javax.swing.JButton();
                            jMenuBar1 = new javax.swing.JMenuBar();
                            jMenu1 = new javax.swing.JMenu();
                            jmni_exportarcatalogo = new javax.swing.JMenuItem();
                            jMenuItem2 = new javax.swing.JMenuItem();
                            jmni_salir = new javax.swing.JMenuItem();
                            jMenu3 = new javax.swing.JMenu();
                            jMenuItem1 = new javax.swing.JMenuItem();
                            jmni_escape = new javax.swing.JMenuItem();
                            jmni_edicion = new javax.swing.JMenuItem();
                            jMenuItem3 = new javax.swing.JMenuItem();
                            jmni_imprimirbrib = new javax.swing.JMenuItem();
                            jMenuItem4 = new javax.swing.JMenuItem();
                            jMenuItem5 = new javax.swing.JMenuItem();
                            jMenu2 = new javax.swing.JMenu();
                            jmni_crearcomentario = new javax.swing.JMenuItem();

                            setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
                            org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(sie_invdis.Sie_invdisApp.class).getContext().getResourceMap(com_distri_articulos_almacen.class);
                            setTitle(resourceMap.getString("Form.title")); // NOI18N
                            setName("Form"); // NOI18N

                            jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel2.border.title"))); // NOI18N
                            jPanel2.setName("jPanel2"); // NOI18N

                            buttonGroup1.add(jrb_bclave);
                            jrb_bclave.setText(resourceMap.getString("jrb_bclave.text")); // NOI18N
                            jrb_bclave.setToolTipText(resourceMap.getString("jrb_bclave.toolTipText")); // NOI18N
                            jrb_bclave.setActionCommand(resourceMap.getString("jrb_bclave.actionCommand")); // NOI18N
                            jrb_bclave.setName("jrb_bclave"); // NOI18N
                            jrb_bclave.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jrb_bclaveActionPerformed(evt);
                                }
                            });

                            buttonGroup1.add(jrb_bdescrip);
                            jrb_bdescrip.setText(resourceMap.getString("jrb_bdescrip.text")); // NOI18N
                            jrb_bdescrip.setToolTipText(resourceMap.getString("jrb_bdescrip.toolTipText")); // NOI18N
                            jrb_bdescrip.setActionCommand(resourceMap.getString("jrb_bdescrip.actionCommand")); // NOI18N
                            jrb_bdescrip.setName("jrb_bdescrip"); // NOI18N
                            jrb_bdescrip.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jrb_bdescripActionPerformed(evt);
                                }
                            });

                            jtf_busqueda.setToolTipText(resourceMap.getString("jtf_busqueda.toolTipText")); // NOI18N
                            jtf_busqueda.setName("jtf_busqueda"); // NOI18N
                            jtf_busqueda.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jtf_busquedaActionPerformed(evt);
                                }
                            });

                            jbtn_buscar.setIcon(resourceMap.getIcon("jbtn_buscar.icon")); // NOI18N
                            jbtn_buscar.setText(resourceMap.getString("jbtn_buscar.text")); // NOI18N
                            jbtn_buscar.setName("jbtn_buscar"); // NOI18N
                            jbtn_buscar.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jbtn_buscarActionPerformed(evt);
                                }
                            });

                            buttonGroup1.add(jrb_bitem);
                            jrb_bitem.setText(resourceMap.getString("jrb_bitem.text")); // NOI18N
                            jrb_bitem.setToolTipText(resourceMap.getString("jrb_bitem.toolTipText")); // NOI18N
                            jrb_bitem.setActionCommand(resourceMap.getString("jrb_bitem.actionCommand")); // NOI18N
                            jrb_bitem.setName("jrb_bitem"); // NOI18N
                            jrb_bitem.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jrb_bitemActionPerformed(evt);
                                }
                            });

                            buttonGroup1.add(jrb_bprecio);
                            jrb_bprecio.setText(resourceMap.getString("jrb_bprecio.text")); // NOI18N
                            jrb_bprecio.setToolTipText(resourceMap.getString("jrb_bprecio.toolTipText")); // NOI18N
                            jrb_bprecio.setActionCommand(resourceMap.getString("jrb_bprecio.actionCommand")); // NOI18N
                            jrb_bprecio.setName("jrb_bprecio"); // NOI18N
                            jrb_bprecio.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jrb_bprecioActionPerformed(evt);
                                }
                            });

                            buttonGroup2.add(jrb_obexacto);
                            jrb_obexacto.setText(resourceMap.getString("jrb_obexacto.text")); // NOI18N
                            jrb_obexacto.setToolTipText(resourceMap.getString("jrb_obexacto.toolTipText")); // NOI18N
                            jrb_obexacto.setActionCommand(resourceMap.getString("jrb_obexacto.actionCommand")); // NOI18N
                            jrb_obexacto.setName("jrb_obexacto"); // NOI18N
                            jrb_obexacto.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jrb_obexactoActionPerformed(evt);
                                }
                            });

                            buttonGroup2.add(jrb_obcomienza);
                            jrb_obcomienza.setText(resourceMap.getString("jrb_obcomienza.text")); // NOI18N
                            jrb_obcomienza.setToolTipText(resourceMap.getString("jrb_obcomienza.toolTipText")); // NOI18N
                            jrb_obcomienza.setActionCommand(resourceMap.getString("jrb_obcomienza.actionCommand")); // NOI18N
                            jrb_obcomienza.setName("jrb_obcomienza"); // NOI18N
                            jrb_obcomienza.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jrb_obcomienzaActionPerformed(evt);
                                }
                            });

                            buttonGroup2.add(jrb_obaniway);
                            jrb_obaniway.setText(resourceMap.getString("jrb_obaniway.text")); // NOI18N
                            jrb_obaniway.setToolTipText(resourceMap.getString("jrb_obaniway.toolTipText")); // NOI18N
                            jrb_obaniway.setActionCommand(resourceMap.getString("jrb_obaniway.actionCommand")); // NOI18N
                            jrb_obaniway.setName("jrb_obaniway"); // NOI18N
                            jrb_obaniway.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jrb_obaniwayActionPerformed(evt);
                                }
                            });

                            buttonGroup1.add(jrb_bidfam);
                            jrb_bidfam.setText(resourceMap.getString("jrb_bidfam.text")); // NOI18N
                            jrb_bidfam.setToolTipText(resourceMap.getString("jrb_bidfam.toolTipText")); // NOI18N
                            jrb_bidfam.setActionCommand(resourceMap.getString("jrb_bidfam.actionCommand")); // NOI18N
                            jrb_bidfam.setName("jrb_bidfam"); // NOI18N
                            jrb_bidfam.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jrb_bidfamActionPerformed(evt);
                                }
                            });

                            buttonGroup1.add(jrb_bidsubfam);
                            jrb_bidsubfam.setText(resourceMap.getString("jrb_bidsubfam.text")); // NOI18N
                            jrb_bidsubfam.setToolTipText(resourceMap.getString("jrb_bidsubfam.toolTipText")); // NOI18N
                            jrb_bidsubfam.setActionCommand(resourceMap.getString("jrb_bidsubfam.actionCommand")); // NOI18N
                            jrb_bidsubfam.setName("jrb_bidsubfam"); // NOI18N
                            jrb_bidsubfam.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jrb_bidsubfamActionPerformed(evt);
                                }
                            });

                            buttonGroup1.add(jrb_bdessubfam);
                            jrb_bdessubfam.setText(resourceMap.getString("jrb_bdessubfam.text")); // NOI18N
                            jrb_bdessubfam.setToolTipText(resourceMap.getString("jrb_bdessubfam.toolTipText")); // NOI18N
                            jrb_bdessubfam.setActionCommand(resourceMap.getString("jrb_bdessubfam.actionCommand")); // NOI18N
                            jrb_bdessubfam.setName("jrb_bdessubfam"); // NOI18N
                            jrb_bdessubfam.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jrb_bdessubfamActionPerformed(evt);
                                }
                            });

                            jcbx_verexistenciasad.setText(resourceMap.getString("jcbx_verexistenciasad.text")); // NOI18N
                            jcbx_verexistenciasad.setName("jcbx_verexistenciasad"); // NOI18N
                            jcbx_verexistenciasad.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jcbx_verexistenciasadActionPerformed(evt);
                                }
                            });

                            buttonGroup1.add(jrb_lugaralmacen);
                            jrb_lugaralmacen.setText(resourceMap.getString("jrb_lugaralmacen.text")); // NOI18N
                            jrb_lugaralmacen.setToolTipText(resourceMap.getString("jrb_lugaralmacen.toolTipText")); // NOI18N
                            jrb_lugaralmacen.setActionCommand(resourceMap.getString("jrb_lugaralmacen.actionCommand")); // NOI18N
                            jrb_lugaralmacen.setName("jrb_lugaralmacen"); // NOI18N
                            jrb_lugaralmacen.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jrb_lugaralmacenActionPerformed(evt);
                                }
                            });

                            javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
                            jPanel2.setLayout(jPanel2Layout);
                            jPanel2Layout.setHorizontalGroup(
                                jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanel2Layout.createSequentialGroup()
                                    .addGap(127, 127, 127)
                                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addGroup(jPanel2Layout.createSequentialGroup()
                                            .addComponent(jrb_bclave)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jrb_bdescrip)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jrb_bitem)
                                            .addGap(4, 4, 4)
                                            .addComponent(jrb_bprecio)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jrb_bidfam)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jrb_bidsubfam)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jrb_bdessubfam)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jrb_lugaralmacen)
                                            .addGap(45, 45, 45)
                                            .addComponent(jcbx_verexistenciasad))
                                        .addGroup(jPanel2Layout.createSequentialGroup()
                                            .addComponent(jrb_obexacto)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                            .addComponent(jrb_obcomienza)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jrb_obaniway)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                            .addComponent(jtf_busqueda, javax.swing.GroupLayout.PREFERRED_SIZE, 173, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(33, 33, 33)
                                            .addComponent(jbtn_buscar)))
                                    .addContainerGap(219, Short.MAX_VALUE))
                            );
                            jPanel2Layout.setVerticalGroup(
                                jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanel2Layout.createSequentialGroup()
                                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                        .addComponent(jrb_obcomienza)
                                        .addComponent(jbtn_buscar)
                                        .addComponent(jtf_busqueda, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(jrb_obaniway)
                                        .addComponent(jrb_obexacto))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                        .addComponent(jrb_bclave)
                                        .addComponent(jrb_bdescrip)
                                        .addComponent(jrb_bprecio)
                                        .addComponent(jrb_bitem)
                                        .addComponent(jrb_bidfam)
                                        .addComponent(jrb_bidsubfam)
                                        .addComponent(jrb_bdessubfam)
                                        .addComponent(jcbx_verexistenciasad)
                                        .addComponent(jrb_lugaralmacen)))
                            );

                            jPanel6.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
                            jPanel6.setName("jPanel6"); // NOI18N

                            jbtn_salir.setText(resourceMap.getString("jbtn_salir.text")); // NOI18N
                            jbtn_salir.setName("jbtn_salir"); // NOI18N
                            jbtn_salir.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jbtn_salirActionPerformed(evt);
                                }
                            });

                            jbtn_movimientosalmacen.setIcon(resourceMap.getIcon("jbtn_movimientosalmacen.icon")); // NOI18N
                            jbtn_movimientosalmacen.setText(resourceMap.getString("jbtn_movimientosalmacen.text")); // NOI18N
                            jbtn_movimientosalmacen.setName("jbtn_movimientosalmacen"); // NOI18N
                            jbtn_movimientosalmacen.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jbtn_movimientosalmacenActionPerformed(evt);
                                }
                            });

                            jtb_inveprogramados.setIcon(resourceMap.getIcon("jtb_inveprogramados.icon")); // NOI18N
                            jtb_inveprogramados.setText(resourceMap.getString("jtb_inveprogramados.text")); // NOI18N
                            jtb_inveprogramados.setName("jtb_inveprogramados"); // NOI18N
                            jtb_inveprogramados.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jtb_inveprogramadosActionPerformed(evt);
                                }
                            });

                            jbtn_generorequisicion.setIcon(resourceMap.getIcon("jbtn_generorequisicion.icon")); // NOI18N
                            jbtn_generorequisicion.setText(resourceMap.getString("jbtn_generorequisicion.text")); // NOI18N
                            jbtn_generorequisicion.setName("jbtn_generorequisicion"); // NOI18N
                            jbtn_generorequisicion.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jbtn_generorequisicionActionPerformed(evt);
                                }
                            });

                            jbtn_agregarterminado.setIcon(resourceMap.getIcon("jbtn_agregarterminado.icon")); // NOI18N
                            jbtn_agregarterminado.setText(resourceMap.getString("jbtn_agregarterminado.text")); // NOI18N
                            jbtn_agregarterminado.setName("jbtn_agregarterminado"); // NOI18N
                            jbtn_agregarterminado.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jbtn_agregarterminadoActionPerformed(evt);
                                }
                            });

                            javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
                            jPanel6.setLayout(jPanel6Layout);
                            jPanel6Layout.setHorizontalGroup(
                                jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanel6Layout.createSequentialGroup()
                                    .addContainerGap()
                                    .addComponent(jbtn_agregarterminado)
                                    .addGap(47, 47, 47)
                                    .addComponent(jbtn_generorequisicion)
                                    .addGap(52, 52, 52)
                                    .addComponent(jtb_inveprogramados)
                                    .addGap(152, 152, 152)
                                    .addComponent(jbtn_movimientosalmacen)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 237, Short.MAX_VALUE)
                                    .addComponent(jbtn_salir, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(20, 20, 20))
                            );
                            jPanel6Layout.setVerticalGroup(
                                jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jbtn_movimientosalmacen)
                                    .addComponent(jbtn_salir)
                                    .addComponent(jtb_inveprogramados)
                                    .addComponent(jbtn_generorequisicion)
                                    .addComponent(jbtn_agregarterminado))
                            );

                            jTabbedPane1.setName("jTabbedPane1"); // NOI18N
                            jTabbedPane1.addChangeListener(new javax.swing.event.ChangeListener() {
                                public void stateChanged(javax.swing.event.ChangeEvent evt) {
                                    jTabbedPane1StateChanged(evt);
                                }
                            });

                            jPanel3.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
                            jPanel3.setName("jPanel3"); // NOI18N

                            jScrollPane1.setName("jScrollPane1"); // NOI18N

                            jtb_almacen_catalogo.setModel(this.jtable_modelo);
                            jtb_almacen_catalogo.setName("jtb_almacen_catalogo"); // NOI18N
                            jtb_almacen_catalogo.addMouseListener(new java.awt.event.MouseAdapter() {
                                public void mouseClicked(java.awt.event.MouseEvent evt) {
                                    if(evt.getClickCount() >= 2)
                                    {
                                        dioclick(evt);
                                        //System.out.println(" double click" );

                                    }
                                    if(evt.getClickCount() >= 1)
                                    {
                                        dioclick1(evt);
                                        //System.out.println(" double click" );

                                    }

                                }
                            });
                            jtb_almacen_catalogo.setRowHeight(26);
                            jtb_almacen_catalogo.addMouseListener(new java.awt.event.MouseAdapter() {
                                public void mouseClicked(java.awt.event.MouseEvent evt) {
                                    jtb_almacen_catalogoMouseClicked(evt);
                                }
                            });
                            jScrollPane1.setViewportView(jtb_almacen_catalogo);

                            jlbl_textobuscado.setFont(resourceMap.getFont("jlbl_textobuscado.font")); // NOI18N
                            jlbl_textobuscado.setText(resourceMap.getString("jlbl_textobuscado.text")); // NOI18N
                            jlbl_textobuscado.setName("jlbl_textobuscado"); // NOI18N

                            jLabel3.setFont(resourceMap.getFont("jLabel3.font")); // NOI18N
                            jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N
                            jLabel3.setName("jLabel3"); // NOI18N

                            jlbl_cantidadregistros.setFont(resourceMap.getFont("jlbl_cantidadregistros.font")); // NOI18N
                            jlbl_cantidadregistros.setText(resourceMap.getString("jlbl_cantidadregistros.text")); // NOI18N
                            jlbl_cantidadregistros.setName("jlbl_cantidadregistros"); // NOI18N

                            jLabel5.setFont(resourceMap.getFont("jLabel5.font")); // NOI18N
                            jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N
                            jLabel5.setName("jLabel5"); // NOI18N

                            jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N
                            jLabel4.setName("jLabel4"); // NOI18N

                            jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel4.border.title"))); // NOI18N
                            jPanel4.setName("jPanel4"); // NOI18N

                            jScrollPane2.setName("jScrollPane2"); // NOI18N

                            jtb_almacen_proveedor.setModel(this.jtable_modelo_proveedorexistencia);
                            jtb_almacen_proveedor.setName("jtb_almacen_proveedor"); // NOI18N
                            jtb_almacen_proveedor.addMouseListener(new java.awt.event.MouseAdapter() {
                                public void mouseClicked(java.awt.event.MouseEvent evt) {
                                    jtb_almacen_proveedorMouseClicked(evt);
                                    if(evt.getClickCount() >= 2)
                                    {
                                        dioclickproveedor(evt);
                                        //System.out.println(" double click" );

                                    }
                                }
                            });
                            jScrollPane2.setViewportView(jtb_almacen_proveedor);

                            javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
                            jPanel4.setLayout(jPanel4Layout);
                            jPanel4Layout.setHorizontalGroup(
                                jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 355, Short.MAX_VALUE)
                            );
                            jPanel4Layout.setVerticalGroup(
                                jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 128, Short.MAX_VALUE)
                            );

                            jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel5.border.title"))); // NOI18N
                            jPanel5.setName("jPanel5"); // NOI18N

                            jScrollPane3.setName("jScrollPane3"); // NOI18N

                            jtb_almacen_familias.setModel(this.jtable_modelo_familiarexistencia);
                            jtb_almacen_familias.setName("jtb_almacen_familias"); // NOI18N
                            jtb_almacen_familias.addMouseListener(new java.awt.event.MouseAdapter() {
                                public void mouseClicked(java.awt.event.MouseEvent evt) {
                                    jtb_almacen_familiasMouseClicked(evt);
                                    if(evt.getClickCount() >= 2)
                                    {
                                        dioclickfamilia(evt);
                                        //System.out.println(" double click" );

                                    }
                                }
                            });
                            jScrollPane3.setViewportView(jtb_almacen_familias);

                            javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
                            jPanel5.setLayout(jPanel5Layout);
                            jPanel5Layout.setHorizontalGroup(
                                jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 384, Short.MAX_VALUE)
                            );
                            jPanel5Layout.setVerticalGroup(
                                jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jScrollPane3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 128, Short.MAX_VALUE)
                            );

                            jScrollPane9.setName("jScrollPane9"); // NOI18N

                            jep_articuloimagen.setContentType(resourceMap.getString("jep_articuloimagen.contentType")); // NOI18N
                            jep_articuloimagen.setName("jep_articuloimagen"); // NOI18N
                            jScrollPane9.setViewportView(jep_articuloimagen);

                            javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
                            jPanel3.setLayout(jPanel3Layout);
                            jPanel3Layout.setHorizontalGroup(
                                jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanel3Layout.createSequentialGroup()
                                    .addComponent(jLabel4)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jlbl_textobuscado, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jLabel3)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(jlbl_cantidadregistros, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jLabel5)
                                    .addGap(567, 567, 567))
                                .addGroup(jPanel3Layout.createSequentialGroup()
                                    .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(18, 18, 18)
                                    .addComponent(jScrollPane9, javax.swing.GroupLayout.DEFAULT_SIZE, 304, Short.MAX_VALUE)
                                    .addContainerGap())
                                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 1113, Short.MAX_VALUE)
                            );
                            jPanel3Layout.setVerticalGroup(
                                jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanel3Layout.createSequentialGroup()
                                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                        .addComponent(jLabel4)
                                        .addComponent(jlbl_textobuscado)
                                        .addComponent(jLabel3)
                                        .addComponent(jlbl_cantidadregistros)
                                        .addComponent(jLabel5))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 302, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(jPanel5, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(jPanel4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(jScrollPane9, javax.swing.GroupLayout.DEFAULT_SIZE, 158, Short.MAX_VALUE))
                                    .addContainerGap())
                            );

                            jTabbedPane1.addTab(resourceMap.getString("jPanel3.TabConstraints.tabTitle"), jPanel3); // NOI18N

                            jPanel1.setName("jPanel1"); // NOI18N

                            jScrollPane4.setName("jScrollPane4"); // NOI18N

                            jtb_almacen_control.setModel(this.jtable_modelo_almacen);
                            jtb_almacen_control.setName("jtb_almacen_control"); // NOI18N
                            jtb_almacen_control.setRowHeight(26);
                            jtb_almacen_control.addMouseListener(new java.awt.event.MouseAdapter() {
                                public void mouseClicked(java.awt.event.MouseEvent evt) {
                                    jtb_almacen_controlMouseClicked(evt);
                                    if(evt.getClickCount() >= 2)
                                    {
                                        dioclickartialma(evt);
                                        //System.out.println(" double click" );

                                    }
                                }
                            });
                            jScrollPane4.setViewportView(jtb_almacen_control);

                            jLabel6.setFont(resourceMap.getFont("jLabel6.font")); // NOI18N
                            jLabel6.setText(resourceMap.getString("jLabel6.text")); // NOI18N
                            jLabel6.setName("jLabel6"); // NOI18N

                            jlbl_cantidadregistros1.setFont(resourceMap.getFont("jlbl_cantidadregistros1.font")); // NOI18N
                            jlbl_cantidadregistros1.setText(resourceMap.getString("jlbl_cantidadregistros1.text")); // NOI18N
                            jlbl_cantidadregistros1.setName("jlbl_cantidadregistros1"); // NOI18N

                            jLabel7.setFont(resourceMap.getFont("jLabel7.font")); // NOI18N
                            jLabel7.setText(resourceMap.getString("jLabel7.text")); // NOI18N
                            jLabel7.setName("jLabel7"); // NOI18N

                            jLabel8.setText(resourceMap.getString("jLabel8.text")); // NOI18N
                            jLabel8.setName("jLabel8"); // NOI18N

                            jbtn_generaeti.setIcon(resourceMap.getIcon("jbtn_generaeti.icon")); // NOI18N
                            jbtn_generaeti.setText(resourceMap.getString("jbtn_generaeti.text")); // NOI18N
                            jbtn_generaeti.setName("jbtn_generaeti"); // NOI18N
                            jbtn_generaeti.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jbtn_generaetiActionPerformed(evt);
                                }
                            });

                            jLabel15.setText(resourceMap.getString("jLabel15.text")); // NOI18N
                            jLabel15.setName("jLabel15"); // NOI18N

                            jtf_unidad.setEditable(false);
                            jtf_unidad.setText(resourceMap.getString("jtf_unidad.text")); // NOI18N
                            jtf_unidad.setToolTipText(resourceMap.getString("jtf_unidad.toolTipText")); // NOI18N
                            jtf_unidad.setName("jtf_unidad"); // NOI18N

                            jLabel19.setText(resourceMap.getString("jLabel19.text")); // NOI18N
                            jLabel19.setName("jLabel19"); // NOI18N

                            jtf_cantidadeti.setText(resourceMap.getString("jtf_cantidadeti.text")); // NOI18N
                            jtf_cantidadeti.setName("jtf_cantidadeti"); // NOI18N
                            jtf_cantidadeti.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jtf_cantidadetiActionPerformed(evt);
                                }
                            });

                            javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
                            jPanel1.setLayout(jPanel1Layout);
                            jPanel1Layout.setHorizontalGroup(
                                jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
                                            .addComponent(jLabel8)
                                            .addGap(81, 81, 81)
                                            .addComponent(jLabel6)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                            .addComponent(jlbl_cantidadregistros1, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jLabel7)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 104, Short.MAX_VALUE)
                                            .addComponent(jLabel15)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jtf_unidad, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(32, 32, 32)
                                            .addComponent(jLabel19)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                            .addComponent(jtf_cantidadeti, javax.swing.GroupLayout.PREFERRED_SIZE, 61, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addGroup(jPanel1Layout.createSequentialGroup()
                                            .addContainerGap(459, Short.MAX_VALUE)
                                            .addComponent(jbtn_generaeti)))
                                    .addGap(461, 461, 461))
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addGap(1, 1, 1)
                                        .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 1113, Short.MAX_VALUE)
                                        .addGap(1, 1, 1)))
                            );
                            jPanel1Layout.setVerticalGroup(
                                jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanel1Layout.createSequentialGroup()
                                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(jLabel7)
                                            .addComponent(jlbl_cantidadregistros1)
                                            .addComponent(jLabel6)
                                            .addComponent(jLabel8))
                                        .addGroup(jPanel1Layout.createSequentialGroup()
                                            .addContainerGap()
                                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                .addComponent(jLabel15)
                                                .addComponent(jtf_unidad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(jtf_cantidadeti, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(jLabel19))))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 439, Short.MAX_VALUE)
                                    .addComponent(jbtn_generaeti)
                                    .addContainerGap())
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addGap(40, 40, 40)
                                        .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addContainerGap(64, Short.MAX_VALUE)))
                            );

                            jTabbedPane1.addTab(resourceMap.getString("jPanel1.TabConstraints.tabTitle"), jPanel1); // NOI18N

                            jPanel7.setName("jPanel7"); // NOI18N

                            jScrollPane5.setName("jScrollPane5"); // NOI18N

                            jepn_fotos.setContentType(resourceMap.getString("jepn_fotos.contentType")); // NOI18N
                            jepn_fotos.setName("jepn_fotos"); // NOI18N
                            jScrollPane5.setViewportView(jepn_fotos);

                            jlbl_paginas.setText(resourceMap.getString("jlbl_paginas.text")); // NOI18N
                            jlbl_paginas.setName("jlbl_paginas"); // NOI18N

                            jbtn_anterior.setText(resourceMap.getString("jbtn_anterior.text")); // NOI18N
                            jbtn_anterior.setName("jbtn_anterior"); // NOI18N
                            jbtn_anterior.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jbtn_anteriorActionPerformed(evt);
                                }
                            });

                            jtf_paginaactual.setText(resourceMap.getString("jtf_paginaactual.text")); // NOI18N
                            jtf_paginaactual.setName("jtf_paginaactual"); // NOI18N
                            jtf_paginaactual.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jtf_paginaactualActionPerformed(evt);
                                }
                            });

                            jbtn_siguiente.setText(resourceMap.getString("jbtn_siguiente.text")); // NOI18N
                            jbtn_siguiente.setName("jbtn_siguiente"); // NOI18N
                            jbtn_siguiente.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jbtn_siguienteActionPerformed(evt);
                                }
                            });

                            jtf_fotosartxpag.setText(resourceMap.getString("jtf_fotosartxpag.text")); // NOI18N
                            jtf_fotosartxpag.setToolTipText(resourceMap.getString("jtf_fotosartxpag.toolTipText")); // NOI18N
                            jtf_fotosartxpag.setName("jtf_fotosartxpag"); // NOI18N
                            jtf_fotosartxpag.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jtf_fotosartxpagActionPerformed(evt);
                                }
                            });

                            javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
                            jPanel7.setLayout(jPanel7Layout);
                            jPanel7Layout.setHorizontalGroup(
                                jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanel7Layout.createSequentialGroup()
                                    .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 1105, Short.MAX_VALUE)
                                        .addGroup(jPanel7Layout.createSequentialGroup()
                                            .addComponent(jtf_fotosartxpag, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(263, 263, 263)
                                            .addComponent(jlbl_paginas)
                                            .addGap(27, 27, 27)
                                            .addComponent(jbtn_anterior)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jtf_paginaactual, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jbtn_siguiente)))
                                    .addContainerGap())
                            );
                            jPanel7Layout.setVerticalGroup(
                                jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanel7Layout.createSequentialGroup()
                                    .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 460, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 12, Short.MAX_VALUE)
                                    .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                        .addComponent(jlbl_paginas)
                                        .addComponent(jbtn_anterior)
                                        .addComponent(jbtn_siguiente)
                                        .addComponent(jtf_paginaactual, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(jtf_fotosartxpag, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addContainerGap())
                            );

                            jTabbedPane1.addTab(resourceMap.getString("jPanel7.TabConstraints.tabTitle"), jPanel7); // NOI18N

                            jPanel8.setName("jPanel8"); // NOI18N

                            jScrollPane6.setName("jScrollPane6"); // NOI18N

                            jbt_catalogoalmacen.setFont(resourceMap.getFont("jbt_catalogoalmacen.font")); // NOI18N
                            jbt_catalogoalmacen.setModel(this.jtable_modelo_entradaalma);
                            jbt_catalogoalmacen.setName("jbt_catalogoalmacen"); // NOI18N
                            jbt_catalogoalmacen.setRowHeight(26);
                            jbt_catalogoalmacen.getTableHeader().setReorderingAllowed(false);
                            jbt_catalogoalmacen.addMouseListener(new java.awt.event.MouseAdapter() {
                                public void mouseClicked(java.awt.event.MouseEvent evt) {
                                    jbt_catalogoalmacenMouseClicked(evt);
                                    if(evt.getClickCount() >= 2)
                                    {
                                        dioclickdm(evt);
                                        //System.out.println(" double click" );
                                    }
                                }
                            });
                            jScrollPane6.setViewportView(jbt_catalogoalmacen);

                            jScrollPane7.setName("jScrollPane7"); // NOI18N

                            jbt_catalogoalmacendetalle.setFont(resourceMap.getFont("jbt_catalogoalmacendetalle.font")); // NOI18N
                            jbt_catalogoalmacendetalle.setModel(this.jtable_modelo_entradaalmadetalle);
                            jbt_catalogoalmacendetalle.setName("jbt_catalogoalmacendetalle"); // NOI18N
                            jbt_catalogoalmacendetalle.setRowHeight(26);
                            jbt_catalogoalmacendetalle.getTableHeader().setReorderingAllowed(false);
                            jScrollPane7.setViewportView(jbt_catalogoalmacendetalle);

                            jLabel9.setText(resourceMap.getString("jLabel9.text")); // NOI18N
                            jLabel9.setName("jLabel9"); // NOI18N

                            jtf_movidfolio.setEditable(false);
                            jtf_movidfolio.setName("jtf_movidfolio"); // NOI18N

                            jLabel12.setText(resourceMap.getString("jLabel12.text")); // NOI18N
                            jLabel12.setName("jLabel12"); // NOI18N

                            jtf_movfecha.setEditable(false);
                            jtf_movfecha.setName("jtf_movfecha"); // NOI18N

                            jLabel10.setText(resourceMap.getString("jLabel10.text")); // NOI18N
                            jLabel10.setName("jLabel10"); // NOI18N

                            jtf_movdescribe.setEditable(false);
                            jtf_movdescribe.setName("jtf_movdescribe"); // NOI18N

                            jLabel11.setText(resourceMap.getString("jLabel11.text")); // NOI18N
                            jLabel11.setName("jLabel11"); // NOI18N

                            jtf_movalmacen.setEditable(false);
                            jtf_movalmacen.setName("jtf_movalmacen"); // NOI18N

                            jLabel13.setText(resourceMap.getString("jLabel13.text")); // NOI18N
                            jLabel13.setName("jLabel13"); // NOI18N

                            jtf_piezasmov.setEditable(false);
                            jtf_piezasmov.setName("jtf_piezasmov"); // NOI18N

                            jbtn_Imprimir.setIcon(resourceMap.getIcon("jbtn_Imprimir.icon")); // NOI18N
                            jbtn_Imprimir.setText(resourceMap.getString("jbtn_Imprimir.text")); // NOI18N
                            jbtn_Imprimir.setName("jbtn_Imprimir"); // NOI18N
                            jbtn_Imprimir.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jbtn_ImprimirActionPerformed(evt);
                                }
                            });

                            javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
                            jPanel8.setLayout(jPanel8Layout);
                            jPanel8Layout.setHorizontalGroup(
                                jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanel8Layout.createSequentialGroup()
                                    .addComponent(jScrollPane6, javax.swing.GroupLayout.DEFAULT_SIZE, 1105, Short.MAX_VALUE)
                                    .addContainerGap())
                                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()
                                    .addComponent(jScrollPane7, javax.swing.GroupLayout.DEFAULT_SIZE, 808, Short.MAX_VALUE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addGroup(jPanel8Layout.createSequentialGroup()
                                            .addComponent(jLabel9)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jtf_movidfolio, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addGroup(jPanel8Layout.createSequentialGroup()
                                            .addComponent(jLabel10)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jtf_movdescribe, javax.swing.GroupLayout.PREFERRED_SIZE, 178, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addGroup(jPanel8Layout.createSequentialGroup()
                                            .addComponent(jLabel11)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jtf_movalmacen, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addGroup(jPanel8Layout.createSequentialGroup()
                                            .addComponent(jLabel12)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jtf_movfecha, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addComponent(jbtn_Imprimir)
                                        .addGroup(jPanel8Layout.createSequentialGroup()
                                            .addComponent(jLabel13)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jtf_piezasmov, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                    .addGap(51, 51, 51))
                            );
                            jPanel8Layout.setVerticalGroup(
                                jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()
                                    .addGap(47, 47, 47)
                                    .addComponent(jScrollPane6, javax.swing.GroupLayout.DEFAULT_SIZE, 203, Short.MAX_VALUE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                        .addGroup(jPanel8Layout.createSequentialGroup()
                                            .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                .addComponent(jLabel9)
                                                .addComponent(jtf_movidfolio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                            .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                .addComponent(jLabel12)
                                                .addComponent(jtf_movfecha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                            .addGap(19, 19, 19)
                                            .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                .addComponent(jLabel10)
                                                .addComponent(jtf_movdescribe, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                            .addGap(18, 18, 18)
                                            .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                .addComponent(jLabel11)
                                                .addComponent(jtf_movalmacen, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                            .addGap(18, 18, 18)
                                            .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                .addComponent(jLabel13)
                                                .addComponent(jtf_piezasmov, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 13, Short.MAX_VALUE)
                                            .addComponent(jbtn_Imprimir))
                                        .addComponent(jScrollPane7, javax.swing.GroupLayout.PREFERRED_SIZE, 204, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGap(46, 46, 46))
                            );

                            jTabbedPane1.addTab(resourceMap.getString("jPanel8.TabConstraints.tabTitle"), jPanel8); // NOI18N

                            jPanel9.setName("jPanel9"); // NOI18N

                            jScrollPane8.setName("jScrollPane8"); // NOI18N

                            jlst_clientesdistribucion.setModel(this.modelo);
                            jlst_clientesdistribucion.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
                            jlst_clientesdistribucion.setName("jlst_clientesdistribucion"); // NOI18N
                            jlst_clientesdistribucion.addMouseListener(new java.awt.event.MouseAdapter() {
                                public void mouseClicked(java.awt.event.MouseEvent evt) {
                                    jlst_clientesdistribucionMouseClicked(evt);
                                    if(evt.getClickCount() >= 1)
                                    {
                                        dioclickdetalm(evt);
                                    }
                                }
                            });
                            jScrollPane8.setViewportView(jlst_clientesdistribucion);

                            jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
                            jLabel1.setName("jLabel1"); // NOI18N

                            jScrollPane12.setName("jScrollPane12"); // NOI18N

                            jtbl_articulosentiendas.setModel(this.jtable_modelo_detallealma);
                            jtbl_articulosentiendas.setName("jtbl_articulosentiendas"); // NOI18N
                            jtbl_articulosentiendas.setRowHeight(26);
                            jtbl_articulosentiendas.addMouseListener(new java.awt.event.MouseAdapter() {
                                public void mouseClicked(java.awt.event.MouseEvent evt) {
                                    jtbl_articulosentiendasMouseClicked(evt);
                                    if(evt.getClickCount() >= 2)
                                    {
                                        dioclickalmacendet(evt);
                                        //System.out.println(" double click" );
                                    }
                                }
                            });
                            jScrollPane12.setViewportView(jtbl_articulosentiendas);

                            jtf_idtienda.setEditable(false);
                            jtf_idtienda.setText(resourceMap.getString("jtf_idtienda.text")); // NOI18N
                            jtf_idtienda.setName("jtf_idtienda"); // NOI18N

                            jtf_idtiendades.setEditable(false);
                            jtf_idtiendades.setName("jtf_idtiendades"); // NOI18N

                            jcbx_solonegativas.setText(resourceMap.getString("jcbx_solonegativas.text")); // NOI18N
                            jcbx_solonegativas.setName("jcbx_solonegativas"); // NOI18N
                            jcbx_solonegativas.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jcbx_solonegativasActionPerformed(evt);
                                }
                            });

                            jlbl_articulos.setText(resourceMap.getString("jlbl_articulos.text")); // NOI18N
                            jlbl_articulos.setName("jlbl_articulos"); // NOI18N

                            jcbx_solonegativas1.setText(resourceMap.getString("jcbx_solonegativas1.text")); // NOI18N
                            jcbx_solonegativas1.setName("jcbx_solonegativas1"); // NOI18N

                            jButton2.setIcon(resourceMap.getIcon("jButton2.icon")); // NOI18N
                            jButton2.setText(resourceMap.getString("jButton2.text")); // NOI18N
                            jButton2.setName("jButton2"); // NOI18N
                            jButton2.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jButton2ActionPerformed(evt);
                                }
                            });

                            jtf_pagini.setText(resourceMap.getString("jtf_pagini.text")); // NOI18N
                            jtf_pagini.setName("jtf_pagini"); // NOI18N
                            jtf_pagini.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jtf_paginiActionPerformed(evt);
                                }
                            });

                            jtf_pagfin.setText(resourceMap.getString("jtf_pagfin.text")); // NOI18N
                            jtf_pagfin.setName("jtf_pagfin"); // NOI18N
                            jtf_pagfin.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jtf_pagfinActionPerformed(evt);
                                }
                            });

                            jtf_busqueda1.setText(resourceMap.getString("jtf_busqueda1.text")); // NOI18N
                            jtf_busqueda1.setToolTipText(resourceMap.getString("jtf_busqueda1.toolTipText")); // NOI18N
                            jtf_busqueda1.setName("jtf_busqueda1"); // NOI18N
                            jtf_busqueda1.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jtf_busqueda1ActionPerformed(evt);
                                }
                            });

                            jScrollPane14.setName("jScrollPane14"); // NOI18N

                            jtbl_articulosentiendas1.setModel(this.jtable_modelo_detallealmab);
                            jtbl_articulosentiendas1.setName("jtbl_articulosentiendas1"); // NOI18N
                            jtbl_articulosentiendas1.setRowHeight(26);
                            jtbl_articulosentiendas.addMouseListener(new java.awt.event.MouseAdapter() {
                                public void mouseClicked(java.awt.event.MouseEvent evt) {
                                    jtbl_articulosentiendasMouseClicked(evt);
                                    if(evt.getClickCount() >= 2)
                                    {
                                        dioclickalmacendet(evt);
                                        //System.out.println(" double click" );
                                    }
                                }
                            });
                            jScrollPane14.setViewportView(jtbl_articulosentiendas1);

                            jlbl_articulos1.setText(resourceMap.getString("jlbl_articulos1.text")); // NOI18N
                            jlbl_articulos1.setName("jlbl_articulos1"); // NOI18N

                            jtf_tiendat1.setEditable(false);
                            jtf_tiendat1.setText(resourceMap.getString("jtf_tiendat1.text")); // NOI18N
                            jtf_tiendat1.setName("jtf_tiendat1"); // NOI18N

                            jLabel16.setText(resourceMap.getString("jLabel16.text")); // NOI18N
                            jLabel16.setName("jLabel16"); // NOI18N

                            jLabel17.setText(resourceMap.getString("jLabel17.text")); // NOI18N
                            jLabel17.setName("jLabel17"); // NOI18N

                            jtf_tiendat2.setEditable(false);
                            jtf_tiendat2.setText(resourceMap.getString("jtf_tiendat2.text")); // NOI18N
                            jtf_tiendat2.setName("jtf_tiendat2"); // NOI18N

                            jLabel18.setText(resourceMap.getString("jLabel18.text")); // NOI18N
                            jLabel18.setName("jLabel18"); // NOI18N

                            jtf_tiendat3.setEditable(false);
                            jtf_tiendat3.setText(resourceMap.getString("jtf_tiendat3.text")); // NOI18N
                            jtf_tiendat3.setName("jtf_tiendat3"); // NOI18N

                            jLabel20.setText(resourceMap.getString("jLabel20.text")); // NOI18N
                            jLabel20.setName("jLabel20"); // NOI18N

                            jtf_tiendat5.setEditable(false);
                            jtf_tiendat5.setText(resourceMap.getString("jtf_tiendat5.text")); // NOI18N
                            jtf_tiendat5.setToolTipText(resourceMap.getString("jtf_tiendat5.toolTipText")); // NOI18N
                            jtf_tiendat5.setName("jtf_tiendat5"); // NOI18N

                            jLabel21.setText(resourceMap.getString("jLabel21.text")); // NOI18N
                            jLabel21.setName("jLabel21"); // NOI18N

                            jtf_tiendat4.setEditable(false);
                            jtf_tiendat4.setText(resourceMap.getString("jtf_tiendat4.text")); // NOI18N
                            jtf_tiendat4.setName("jtf_tiendat4"); // NOI18N

                            jLabel22.setText(resourceMap.getString("jLabel22.text")); // NOI18N
                            jLabel22.setName("jLabel22"); // NOI18N

                            jtf_tiendat6.setEditable(false);
                            jtf_tiendat6.setText(resourceMap.getString("jtf_tiendat6.text")); // NOI18N
                            jtf_tiendat6.setName("jtf_tiendat6"); // NOI18N

                            jLabel23.setText(resourceMap.getString("jLabel23.text")); // NOI18N
                            jLabel23.setName("jLabel23"); // NOI18N

                            jtf_tiendat7.setEditable(false);
                            jtf_tiendat7.setText(resourceMap.getString("jtf_tiendat7.text")); // NOI18N
                            jtf_tiendat7.setName("jtf_tiendat7"); // NOI18N

                            jLabel24.setText(resourceMap.getString("jLabel24.text")); // NOI18N
                            jLabel24.setName("jLabel24"); // NOI18N

                            jtf_tiendat8.setEditable(false);
                            jtf_tiendat8.setText(resourceMap.getString("jtf_tiendat8.text")); // NOI18N
                            jtf_tiendat8.setName("jtf_tiendat8"); // NOI18N

                            jtf_tiendaarti.setEditable(false);
                            jtf_tiendaarti.setText(resourceMap.getString("jtf_tiendaarti.text")); // NOI18N
                            jtf_tiendaarti.setName("jtf_tiendaarti"); // NOI18N

                            jtf_tiendaarti1.setEditable(false);
                            jtf_tiendaarti1.setText(resourceMap.getString("jtf_tiendaarti1.text")); // NOI18N
                            jtf_tiendaarti1.setName("jtf_tiendaarti1"); // NOI18N

                            jcbx_solonegativas2.setText(resourceMap.getString("jcbx_solonegativas2.text")); // NOI18N
                            jcbx_solonegativas2.setName("jcbx_solonegativas2"); // NOI18N
                            jcbx_solonegativas2.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jcbx_solonegativas2ActionPerformed(evt);
                                }
                            });

                            jLabel25.setText(resourceMap.getString("jLabel25.text")); // NOI18N
                            jLabel25.setName("jLabel25"); // NOI18N

                            buttonGroup3.add(jrbt_tiendaid);
                            jrbt_tiendaid.setText(resourceMap.getString("jrbt_tiendaid.text")); // NOI18N
                            jrbt_tiendaid.setToolTipText(resourceMap.getString("jrbt_tiendaid.toolTipText")); // NOI18N
                            jrbt_tiendaid.setActionCommand(resourceMap.getString("jrbt_tiendaid.actionCommand")); // NOI18N
                            jrbt_tiendaid.setName("jrbt_tiendaid"); // NOI18N
                            jrbt_tiendaid.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jrbt_tiendaidActionPerformed(evt);
                                }
                            });

                            buttonGroup3.add(jrbtn_tiendaclave);
                            jrbtn_tiendaclave.setText(resourceMap.getString("jrbtn_tiendaclave.text")); // NOI18N
                            jrbtn_tiendaclave.setToolTipText(resourceMap.getString("jrbtn_tiendaclave.toolTipText")); // NOI18N
                            jrbtn_tiendaclave.setActionCommand(resourceMap.getString("jrbtn_tiendaclave.actionCommand")); // NOI18N
                            jrbtn_tiendaclave.setName("jrbtn_tiendaclave"); // NOI18N
                            jrbtn_tiendaclave.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jrbtn_tiendaclaveActionPerformed(evt);
                                }
                            });

                            jtf_busqueda2.setText(resourceMap.getString("jtf_busqueda2.text")); // NOI18N
                            jtf_busqueda2.setToolTipText(resourceMap.getString("jtf_busqueda2.toolTipText")); // NOI18N
                            jtf_busqueda2.setName("jtf_busqueda2"); // NOI18N
                            jtf_busqueda2.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jtf_busqueda2ActionPerformed(evt);
                                }
                            });

                            jtf_pagini1.setText(resourceMap.getString("jtf_pagini1.text")); // NOI18N
                            jtf_pagini1.setName("jtf_pagini1"); // NOI18N
                            jtf_pagini1.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jtf_pagini1ActionPerformed(evt);
                                }
                            });

                            jtf_pagfin1.setText(resourceMap.getString("jtf_pagfin1.text")); // NOI18N
                            jtf_pagfin1.setName("jtf_pagfin1"); // NOI18N
                            jtf_pagfin1.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jtf_pagfin1ActionPerformed(evt);
                                }
                            });

                            jButton4.setIcon(resourceMap.getIcon("jButton4.icon")); // NOI18N
                            jButton4.setText(resourceMap.getString("jButton4.text")); // NOI18N
                            jButton4.setName("jButton4"); // NOI18N
                            jButton4.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jButton4ActionPerformed(evt);
                                }
                            });

                            jLabel31.setText(resourceMap.getString("jLabel31.text")); // NOI18N
                            jLabel31.setName("jLabel31"); // NOI18N

                            jtf_tiendat13.setEditable(false);
                            jtf_tiendat13.setText(resourceMap.getString("jtf_tiendat13.text")); // NOI18N
                            jtf_tiendat13.setName("jtf_tiendat13"); // NOI18N

                            jLabel32.setText(resourceMap.getString("jLabel32.text")); // NOI18N
                            jLabel32.setName("jLabel32"); // NOI18N

                            jtf_tiendat14.setEditable(false);
                            jtf_tiendat14.setText(resourceMap.getString("jtf_tiendat14.text")); // NOI18N
                            jtf_tiendat14.setName("jtf_tiendat14"); // NOI18N

                            jLabel33.setText(resourceMap.getString("jLabel33.text")); // NOI18N
                            jLabel33.setName("jLabel33"); // NOI18N

                            jtf_tiendat15.setEditable(false);
                            jtf_tiendat15.setText(resourceMap.getString("jtf_tiendat15.text")); // NOI18N
                            jtf_tiendat15.setName("jtf_tiendat15"); // NOI18N

                            jLabel34.setText(resourceMap.getString("jLabel34.text")); // NOI18N
                            jLabel34.setName("jLabel34"); // NOI18N

                            jtf_tiendat16.setEditable(false);
                            jtf_tiendat16.setText(resourceMap.getString("jtf_tiendat16.text")); // NOI18N
                            jtf_tiendat16.setName("jtf_tiendat16"); // NOI18N

                            jlbl_articulos3.setText(resourceMap.getString("jlbl_articulos3.text")); // NOI18N
                            jlbl_articulos3.setName("jlbl_articulos3"); // NOI18N

                            jtf_articulosrebajados.setEditable(false);
                            jtf_articulosrebajados.setText(resourceMap.getString("jtf_articulosrebajados.text")); // NOI18N
                            jtf_articulosrebajados.setName("jtf_articulosrebajados"); // NOI18N

                            jtf_articulosrebajados1.setEditable(false);
                            jtf_articulosrebajados1.setText(resourceMap.getString("jtf_articulosrebajados1.text")); // NOI18N
                            jtf_articulosrebajados1.setName("jtf_articulosrebajados1"); // NOI18N

                            jtf_articulosrebajados2.setEditable(false);
                            jtf_articulosrebajados2.setText(resourceMap.getString("jtf_articulosrebajados2.text")); // NOI18N
                            jtf_articulosrebajados2.setName("jtf_articulosrebajados2"); // NOI18N

                            jtf_articulosrebajados3.setEditable(false);
                            jtf_articulosrebajados3.setText(resourceMap.getString("jtf_articulosrebajados3.text")); // NOI18N
                            jtf_articulosrebajados3.setName("jtf_articulosrebajados3"); // NOI18N

                            jtf_articulosrebajados4.setEditable(false);
                            jtf_articulosrebajados4.setText(resourceMap.getString("jtf_articulosrebajados4.text")); // NOI18N
                            jtf_articulosrebajados4.setName("jtf_articulosrebajados4"); // NOI18N

                            jtf_articulosrebajados5.setEditable(false);
                            jtf_articulosrebajados5.setText(resourceMap.getString("jtf_articulosrebajados5.text")); // NOI18N
                            jtf_articulosrebajados5.setName("jtf_articulosrebajados5"); // NOI18N

                            jtf_articulosrebajados6.setEditable(false);
                            jtf_articulosrebajados6.setText(resourceMap.getString("jtf_articulosrebajados6.text")); // NOI18N
                            jtf_articulosrebajados6.setName("jtf_articulosrebajados6"); // NOI18N

                            jtf_articulosrebajados7.setEditable(false);
                            jtf_articulosrebajados7.setText(resourceMap.getString("jtf_articulosrebajados7.text")); // NOI18N
                            jtf_articulosrebajados7.setName("jtf_articulosrebajados7"); // NOI18N

                            buttonGroup3.add(jrbt_tiendaid1);
                            jrbt_tiendaid1.setText(resourceMap.getString("jrbt_tiendaid1.text")); // NOI18N
                            jrbt_tiendaid1.setToolTipText(resourceMap.getString("jrbt_tiendaid1.toolTipText")); // NOI18N
                            jrbt_tiendaid1.setActionCommand(resourceMap.getString("jrbt_tiendaid1.actionCommand")); // NOI18N
                            jrbt_tiendaid1.setName("jrbt_tiendaid1"); // NOI18N
                            jrbt_tiendaid1.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jrbt_tiendaid1ActionPerformed(evt);
                                }
                            });

                            javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
                            jPanel9.setLayout(jPanel9Layout);
                            jPanel9Layout.setHorizontalGroup(
                                jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel9Layout.createSequentialGroup()
                                    .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addGroup(jPanel9Layout.createSequentialGroup()
                                            .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                            .addComponent(jtf_idtienda, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addComponent(jScrollPane8, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addGroup(jPanel9Layout.createSequentialGroup()
                                            .addComponent(jtf_idtiendades, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jLabel25)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jrbt_tiendaid)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jrbtn_tiendaclave)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                            .addComponent(jrbt_tiendaid1)
                                            .addGap(20, 20, 20)
                                            .addComponent(jcbx_solonegativas1)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jcbx_solonegativas)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jcbx_solonegativas2)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jtf_busqueda1, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jtf_pagini, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jtf_pagfin, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                            .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, 194, Short.MAX_VALUE))
                                        .addComponent(jScrollPane12, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 975, Short.MAX_VALUE)
                                        .addGroup(jPanel9Layout.createSequentialGroup()
                                            .addComponent(jlbl_articulos1)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jtf_tiendaarti1, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                            .addComponent(jtf_articulosrebajados2, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(3, 3, 3)
                                            .addComponent(jtf_articulosrebajados3, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jLabel21)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                            .addComponent(jtf_tiendat4, javax.swing.GroupLayout.PREFERRED_SIZE, 62, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jLabel22)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                            .addComponent(jtf_tiendat6, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jLabel23)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                            .addComponent(jtf_tiendat7, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jLabel24)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jtf_tiendat8, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jLabel33)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jtf_tiendat15, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jLabel34, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jtf_tiendat16, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jtf_articulosrebajados6, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jtf_articulosrebajados7, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addGroup(jPanel9Layout.createSequentialGroup()
                                            .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                .addGroup(jPanel9Layout.createSequentialGroup()
                                                    .addComponent(jlbl_articulos, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                    .addComponent(jtf_tiendaarti, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                    .addComponent(jLabel16))
                                                .addComponent(jlbl_articulos3, javax.swing.GroupLayout.PREFERRED_SIZE, 169, javax.swing.GroupLayout.PREFERRED_SIZE))
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                .addGroup(jPanel9Layout.createSequentialGroup()
                                                    .addComponent(jtf_tiendat1, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                    .addComponent(jLabel17))
                                                .addComponent(jtf_articulosrebajados, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                .addGroup(jPanel9Layout.createSequentialGroup()
                                                    .addComponent(jtf_tiendat2, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                    .addComponent(jLabel18)
                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                                    .addComponent(jtf_tiendat3, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                    .addComponent(jLabel20)
                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                    .addComponent(jtf_tiendat5, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                    .addComponent(jLabel31)
                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                    .addComponent(jtf_tiendat13, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                    .addComponent(jLabel32, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                    .addComponent(jtf_tiendat14, javax.swing.GroupLayout.DEFAULT_SIZE, 124, Short.MAX_VALUE))
                                                .addGroup(jPanel9Layout.createSequentialGroup()
                                                    .addComponent(jtf_articulosrebajados1, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addGap(95, 95, 95)
                                                    .addComponent(jtf_articulosrebajados4, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                    .addComponent(jtf_articulosrebajados5, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                                    .addComponent(jtf_busqueda2, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                    .addComponent(jtf_pagini1, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                    .addComponent(jtf_pagfin1, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 61, Short.MAX_VALUE)
                                                    .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 163, javax.swing.GroupLayout.PREFERRED_SIZE))))
                                        .addComponent(jScrollPane14, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 975, Short.MAX_VALUE))
                                    .addContainerGap())
                            );
                            jPanel9Layout.setVerticalGroup(
                                jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanel9Layout.createSequentialGroup()
                                    .addGap(37, 37, 37)
                                    .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                        .addComponent(jLabel1)
                                        .addComponent(jtf_idtienda, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(jtf_idtiendades, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(jButton2)
                                        .addComponent(jtf_pagfin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(jtf_pagini, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(jtf_busqueda1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(jcbx_solonegativas1)
                                        .addComponent(jcbx_solonegativas)
                                        .addComponent(jcbx_solonegativas2)
                                        .addComponent(jLabel25)
                                        .addComponent(jrbt_tiendaid)
                                        .addComponent(jrbtn_tiendaclave)
                                        .addComponent(jrbt_tiendaid1))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addGroup(jPanel9Layout.createSequentialGroup()
                                            .addComponent(jScrollPane12, javax.swing.GroupLayout.PREFERRED_SIZE, 203, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                .addComponent(jlbl_articulos)
                                                .addComponent(jtf_tiendaarti, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(jtf_tiendat1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(jLabel16)
                                                .addComponent(jtf_tiendat2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(jLabel17)
                                                .addComponent(jtf_tiendat3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(jLabel18)
                                                .addComponent(jtf_tiendat5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(jLabel20)
                                                .addComponent(jtf_tiendat13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(jLabel31)
                                                .addComponent(jtf_tiendat14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(jLabel32))
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                            .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                .addComponent(jtf_pagfin1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(jtf_pagini1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(jtf_busqueda2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(jButton4)
                                                .addComponent(jlbl_articulos3)
                                                .addComponent(jtf_articulosrebajados, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(jtf_articulosrebajados1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(jtf_articulosrebajados4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(jtf_articulosrebajados5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                            .addGap(5, 5, 5)
                                            .addComponent(jScrollPane14, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                .addGroup(jPanel9Layout.createSequentialGroup()
                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 11, Short.MAX_VALUE)
                                                    .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                        .addComponent(jtf_tiendat4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                        .addComponent(jLabel21)
                                                        .addComponent(jlbl_articulos1)
                                                        .addComponent(jtf_tiendat6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                        .addComponent(jLabel22)
                                                        .addComponent(jtf_tiendat7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                        .addComponent(jLabel23)
                                                        .addComponent(jtf_tiendaarti1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                        .addComponent(jtf_articulosrebajados2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                        .addComponent(jtf_articulosrebajados3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                        .addComponent(jtf_tiendat8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                        .addComponent(jLabel24)
                                                        .addComponent(jtf_tiendat15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                        .addComponent(jLabel33)
                                                        .addComponent(jtf_tiendat16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                        .addComponent(jLabel34)))
                                                .addGroup(jPanel9Layout.createSequentialGroup()
                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                                    .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                        .addComponent(jtf_articulosrebajados6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                        .addComponent(jtf_articulosrebajados7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                                        .addComponent(jScrollPane8, javax.swing.GroupLayout.DEFAULT_SIZE, 441, Short.MAX_VALUE))
                                    .addContainerGap())
                            );

                            jTabbedPane1.addTab(resourceMap.getString("jPanel9.TabConstraints.tabTitle"), jPanel9); // NOI18N

                            jPanel10.setName("jPanel10"); // NOI18N

                            jPanel11.setName("jPanel11"); // NOI18N

                            jScrollPane10.setName("jScrollPane10"); // NOI18N

                            jtb_almacen_actualiza.setModel(this.jtable_modelo_alm_update);
                            jtb_almacen_actualiza.setName("jtb_almacen_actualiza"); // NOI18N
                            jtb_almacen_actualiza.addMouseListener(new java.awt.event.MouseAdapter() {
                                public void mouseClicked(java.awt.event.MouseEvent evt) {
                                    jtb_almacen_actualizaMouseClicked(evt);
                                    if(evt.getClickCount() >= 2)
                                    {
                                        dioclickartialmaupdate(evt);
                                        //System.out.println(" double click" );

                                    }
                                }
                            });
                            jScrollPane10.setViewportView(jtb_almacen_actualiza);

                            jScrollPane11.setName("jScrollPane11"); // NOI18N

                            jtb_almacen_replace.setModel(this.jtable_modelo_alm_updatereplace);
                            jtb_almacen_replace.setName("jtb_almacen_replace"); // NOI18N
                            jScrollPane11.setViewportView(jtb_almacen_replace);

                            jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
                            jLabel2.setName("jLabel2"); // NOI18N

                            jtf_textoactualizar.setText(resourceMap.getString("jtf_textoactualizar.text")); // NOI18N
                            jtf_textoactualizar.setName("jtf_textoactualizar"); // NOI18N

                            jLabel14.setText(resourceMap.getString("jLabel14.text")); // NOI18N
                            jLabel14.setName("jLabel14"); // NOI18N

                            buttonGroup4.add(jRadioButton1);
                            jRadioButton1.setText(resourceMap.getString("jRadioButton1.text")); // NOI18N
                            jRadioButton1.setToolTipText(resourceMap.getString("jRadioButton1.toolTipText")); // NOI18N
                            jRadioButton1.setActionCommand(resourceMap.getString("jRadioButton1.actionCommand")); // NOI18N
                            jRadioButton1.setName("jRadioButton1"); // NOI18N
                            jRadioButton1.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jRadioButton1ActionPerformed(evt);
                                }
                            });

                            jchbx_agregarregistros.setText(resourceMap.getString("jchbx_agregarregistros.text")); // NOI18N
                            jchbx_agregarregistros.setName("jchbx_agregarregistros"); // NOI18N
                            jchbx_agregarregistros.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jchbx_agregarregistrosActionPerformed(evt);
                                }
                            });

                            jbtn_cambiosaplicar.setText(resourceMap.getString("jbtn_cambiosaplicar.text")); // NOI18N
                            jbtn_cambiosaplicar.setName("jbtn_cambiosaplicar"); // NOI18N
                            jbtn_cambiosaplicar.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jbtn_cambiosaplicarActionPerformed(evt);
                                }
                            });

                            jScrollPane13.setName("jScrollPane13"); // NOI18N

                            jta_archivo.setName("jta_archivo"); // NOI18N
                            jScrollPane13.setViewportView(jta_archivo);

                            jButton1.setIcon(resourceMap.getIcon("jButton1.icon")); // NOI18N
                            jButton1.setText(resourceMap.getString("jButton1.text")); // NOI18N
                            jButton1.setName("jButton1"); // NOI18N
                            jButton1.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jButton1ActionPerformed(evt);
                                }
                            });

                            buttonGroup4.add(jRadioButton2);
                            jRadioButton2.setText(resourceMap.getString("jRadioButton2.text")); // NOI18N
                            jRadioButton2.setToolTipText(resourceMap.getString("jRadioButton2.toolTipText")); // NOI18N
                            jRadioButton2.setActionCommand(resourceMap.getString("jRadioButton2.actionCommand")); // NOI18N
                            jRadioButton2.setName("jRadioButton2"); // NOI18N
                            jRadioButton2.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jRadioButton2ActionPerformed(evt);
                                }
                            });

                            javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);
                            jPanel11.setLayout(jPanel11Layout);
                            jPanel11Layout.setHorizontalGroup(
                                jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanel11Layout.createSequentialGroup()
                                    .addContainerGap()
                                    .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addGroup(jPanel11Layout.createSequentialGroup()
                                            .addComponent(jScrollPane11, javax.swing.GroupLayout.DEFAULT_SIZE, 1085, Short.MAX_VALUE)
                                            .addContainerGap())
                                        .addGroup(jPanel11Layout.createSequentialGroup()
                                            .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                .addComponent(jScrollPane10, javax.swing.GroupLayout.DEFAULT_SIZE, 926, Short.MAX_VALUE)
                                                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel11Layout.createSequentialGroup()
                                                    .addComponent(jbtn_cambiosaplicar)
                                                    .addGap(297, 297, 297)))
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                .addComponent(jButton1)
                                                .addComponent(jScrollPane13, javax.swing.GroupLayout.PREFERRED_SIZE, 163, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                        .addGroup(jPanel11Layout.createSequentialGroup()
                                            .addComponent(jchbx_agregarregistros)
                                            .addGap(70, 70, 70)
                                            .addComponent(jLabel14)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jtf_textoactualizar, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(152, 152, 152)
                                            .addComponent(jLabel2)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                            .addComponent(jRadioButton1)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jRadioButton2)
                                            .addContainerGap())))
                            );
                            jPanel11Layout.setVerticalGroup(
                                jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanel11Layout.createSequentialGroup()
                                    .addContainerGap()
                                    .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addGroup(jPanel11Layout.createSequentialGroup()
                                            .addComponent(jScrollPane10, javax.swing.GroupLayout.PREFERRED_SIZE, 204, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                    .addComponent(jLabel2)
                                                    .addComponent(jRadioButton1)
                                                    .addComponent(jRadioButton2))
                                                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                    .addComponent(jtf_textoactualizar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addComponent(jLabel14)
                                                    .addComponent(jchbx_agregarregistros))))
                                        .addGroup(jPanel11Layout.createSequentialGroup()
                                            .addComponent(jScrollPane13, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(16, 16, 16)
                                            .addComponent(jButton1)))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jScrollPane11, javax.swing.GroupLayout.PREFERRED_SIZE, 177, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jbtn_cambiosaplicar)
                                    .addContainerGap(31, Short.MAX_VALUE))
                            );

                            javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
                            jPanel10.setLayout(jPanel10Layout);
                            jPanel10Layout.setHorizontalGroup(
                                jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel10Layout.createSequentialGroup()
                                    .addComponent(jPanel11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addContainerGap())
                            );
                            jPanel10Layout.setVerticalGroup(
                                jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanel10Layout.createSequentialGroup()
                                    .addContainerGap()
                                    .addComponent(jPanel11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addContainerGap())
                            );

                            jTabbedPane1.addTab(resourceMap.getString("jPanel10.TabConstraints.tabTitle"), jPanel10); // NOI18N

                            jPanel12.setName("jPanel12"); // NOI18N

                            jPanel13.setName("jPanel13"); // NOI18N

                            jtf_idtiendades1.setEditable(false);
                            jtf_idtiendades1.setName("jtf_idtiendades1"); // NOI18N

                            jtf_idtienda1.setEditable(false);
                            jtf_idtienda1.setName("jtf_idtienda1"); // NOI18N

                            jLabel26.setText(resourceMap.getString("jLabel26.text")); // NOI18N
                            jLabel26.setName("jLabel26"); // NOI18N

                            jScrollPane15.setName("jScrollPane15"); // NOI18N

                            jlst_clientesdistribucion1.setModel(this.modelo);
                            jlst_clientesdistribucion1.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
                            jlst_clientesdistribucion1.setName("jlst_clientesdistribucion1"); // NOI18N
                            jlst_clientesdistribucion1.addMouseListener(new java.awt.event.MouseAdapter() {
                                public void mouseClicked(java.awt.event.MouseEvent evt) {
                                    jlst_clientesdistribucion1MouseClicked(evt);
                                    if(evt.getClickCount() >= 2)
                                    {
                                        dioclickdetalmayb(evt);
                                    }
                                }
                            });
                            jScrollPane15.setViewportView(jlst_clientesdistribucion1);

                            jScrollPane16.setName("jScrollPane16"); // NOI18N

                            jtbl_articulosentiendas2.setModel(this.jtable_modelo_detallealmaayb);
                            jtbl_articulosentiendas2.setName("jtbl_articulosentiendas2"); // NOI18N
                            jtbl_articulosentiendas2.setRowHeight(26);
                            jtbl_articulosentiendas.addMouseListener(new java.awt.event.MouseAdapter() {
                                public void mouseClicked(java.awt.event.MouseEvent evt) {
                                    jtbl_articulosentiendasMouseClicked(evt);
                                    if(evt.getClickCount() >= 2)
                                    {
                                        dioclickalmacendet(evt);
                                        //System.out.println(" double click" );
                                    }
                                }
                            });
                            jScrollPane16.setViewportView(jtbl_articulosentiendas2);

                            jlbl_articulos2.setText(resourceMap.getString("jlbl_articulos2.text")); // NOI18N
                            jlbl_articulos2.setName("jlbl_articulos2"); // NOI18N

                            jtf_tiendaarti2.setEditable(false);
                            jtf_tiendaarti2.setText(resourceMap.getString("jtf_tiendaarti2.text")); // NOI18N
                            jtf_tiendaarti2.setName("jtf_tiendaarti2"); // NOI18N

                            jLabel27.setText(resourceMap.getString("jLabel27.text")); // NOI18N
                            jLabel27.setName("jLabel27"); // NOI18N

                            jtf_tiendat9.setEditable(false);
                            jtf_tiendat9.setText(resourceMap.getString("jtf_tiendat9.text")); // NOI18N
                            jtf_tiendat9.setName("jtf_tiendat9"); // NOI18N

                            jLabel28.setText(resourceMap.getString("jLabel28.text")); // NOI18N
                            jLabel28.setName("jLabel28"); // NOI18N

                            jtf_tiendat10.setEditable(false);
                            jtf_tiendat10.setText(resourceMap.getString("jtf_tiendat10.text")); // NOI18N
                            jtf_tiendat10.setName("jtf_tiendat10"); // NOI18N

                            jLabel29.setText(resourceMap.getString("jLabel29.text")); // NOI18N
                            jLabel29.setName("jLabel29"); // NOI18N

                            jtf_tiendat11.setEditable(false);
                            jtf_tiendat11.setText(resourceMap.getString("jtf_tiendat11.text")); // NOI18N
                            jtf_tiendat11.setName("jtf_tiendat11"); // NOI18N

                            jLabel30.setText(resourceMap.getString("jLabel30.text")); // NOI18N
                            jLabel30.setName("jLabel30"); // NOI18N

                            jtf_tiendat12.setEditable(false);
                            jtf_tiendat12.setText(resourceMap.getString("jtf_tiendat12.text")); // NOI18N
                            jtf_tiendat12.setName("jtf_tiendat12"); // NOI18N

                            jtf_tiendabodega.setEditable(false);
                            jtf_tiendabodega.setText(resourceMap.getString("jtf_tiendabodega.text")); // NOI18N
                            jtf_tiendabodega.setName("jtf_tiendabodega"); // NOI18N

                            jtf_tienda_piso.setEditable(false);
                            jtf_tienda_piso.setText(resourceMap.getString("jtf_tienda_piso.text")); // NOI18N
                            jtf_tienda_piso.setName("jtf_tienda_piso"); // NOI18N

                            jButton5.setIcon(resourceMap.getIcon("jButton5.icon")); // NOI18N
                            jButton5.setText(resourceMap.getString("jButton5.text")); // NOI18N
                            jButton5.setName("jButton5"); // NOI18N
                            jButton5.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jButton5ActionPerformed(evt);
                                }
                            });

                            jtf_busqueda3.setText(resourceMap.getString("jtf_busqueda3.text")); // NOI18N
                            jtf_busqueda3.setToolTipText(resourceMap.getString("jtf_busqueda3.toolTipText")); // NOI18N
                            jtf_busqueda3.setName("jtf_busqueda3"); // NOI18N
                            jtf_busqueda3.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jtf_busqueda3ActionPerformed(evt);
                                }
                            });

                            jtf_pagini2.setText(resourceMap.getString("jtf_pagini2.text")); // NOI18N
                            jtf_pagini2.setName("jtf_pagini2"); // NOI18N
                            jtf_pagini2.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jtf_pagini2ActionPerformed(evt);
                                }
                            });

                            jtf_pagfin2.setText(resourceMap.getString("jtf_pagfin2.text")); // NOI18N
                            jtf_pagfin2.setName("jtf_pagfin2"); // NOI18N
                            jtf_pagfin2.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jtf_pagfin2ActionPerformed(evt);
                                }
                            });

                            jcbx_solonegativas4.setText(resourceMap.getString("jcbx_solonegativas4.text")); // NOI18N
                            jcbx_solonegativas4.setName("jcbx_solonegativas4"); // NOI18N
                            jcbx_solonegativas4.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jcbx_solonegativas4ActionPerformed(evt);
                                }
                            });

                            jLabel35.setText(resourceMap.getString("jLabel35.text")); // NOI18N
                            jLabel35.setName("jLabel35"); // NOI18N

                            jtf_tiendat17.setEditable(false);
                            jtf_tiendat17.setText(resourceMap.getString("jtf_tiendat17.text")); // NOI18N
                            jtf_tiendat17.setName("jtf_tiendat17"); // NOI18N

                            jLabel36.setText(resourceMap.getString("jLabel36.text")); // NOI18N
                            jLabel36.setName("jLabel36"); // NOI18N

                            jtf_tiendat18.setEditable(false);
                            jtf_tiendat18.setText(resourceMap.getString("jtf_tiendat18.text")); // NOI18N
                            jtf_tiendat18.setName("jtf_tiendat18"); // NOI18N

                            jtf_tiendaarti3.setEditable(false);
                            jtf_tiendaarti3.setText(resourceMap.getString("jtf_tiendaarti3.text")); // NOI18N
                            jtf_tiendaarti3.setName("jtf_tiendaarti3"); // NOI18N

                            jtf_tiendaarti4.setEditable(false);
                            jtf_tiendaarti4.setText(resourceMap.getString("jtf_tiendaarti4.text")); // NOI18N
                            jtf_tiendaarti4.setName("jtf_tiendaarti4"); // NOI18N

                            jtf_tiendaarti5.setEditable(false);
                            jtf_tiendaarti5.setText(resourceMap.getString("jtf_tiendaarti5.text")); // NOI18N
                            jtf_tiendaarti5.setName("jtf_tiendaarti5"); // NOI18N

                            jtf_tiendaarti6.setEditable(false);
                            jtf_tiendaarti6.setText(resourceMap.getString("jtf_tiendaarti6.text")); // NOI18N
                            jtf_tiendaarti6.setName("jtf_tiendaarti6"); // NOI18N

                            jcbx_solonegativas5.setText(resourceMap.getString("jcbx_solonegativas5.text")); // NOI18N
                            jcbx_solonegativas5.setName("jcbx_solonegativas5"); // NOI18N
                            jcbx_solonegativas5.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jcbx_solonegativas5ActionPerformed(evt);
                                }
                            });

                            javax.swing.GroupLayout jPanel13Layout = new javax.swing.GroupLayout(jPanel13);
                            jPanel13.setLayout(jPanel13Layout);
                            jPanel13Layout.setHorizontalGroup(
                                jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanel13Layout.createSequentialGroup()
                                    .addContainerGap()
                                    .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addGroup(jPanel13Layout.createSequentialGroup()
                                            .addComponent(jLabel26, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jtf_idtienda1, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jtf_idtiendades1, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(73, 73, 73)
                                            .addComponent(jcbx_solonegativas5, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(10, 10, 10)
                                            .addComponent(jcbx_solonegativas4, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(82, 82, 82)
                                            .addComponent(jtf_busqueda3, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(18, 18, 18)
                                            .addComponent(jtf_pagini2, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jtf_pagfin2, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(72, 72, 72)
                                            .addComponent(jButton5, javax.swing.GroupLayout.DEFAULT_SIZE, 182, Short.MAX_VALUE)
                                            .addGap(33, 33, 33))
                                        .addGroup(jPanel13Layout.createSequentialGroup()
                                            .addComponent(jScrollPane15, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                                .addGroup(jPanel13Layout.createSequentialGroup()
                                                    .addGap(47, 47, 47)
                                                    .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                        .addGroup(jPanel13Layout.createSequentialGroup()
                                                            .addComponent(jlbl_articulos2)
                                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                            .addComponent(jtf_tiendaarti2, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))
                                                        .addComponent(jLabel36))
                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                    .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                                        .addComponent(jtf_tiendat18, javax.swing.GroupLayout.Alignment.LEADING)
                                                        .addComponent(jtf_tiendabodega, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 84, Short.MAX_VALUE))
                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                    .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                        .addGroup(jPanel13Layout.createSequentialGroup()
                                                            .addComponent(jtf_tienda_piso, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                            .addComponent(jLabel27))
                                                        .addComponent(jtf_tiendaarti3, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))
                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                    .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                                        .addComponent(jtf_tiendaarti5)
                                                        .addComponent(jtf_tiendat9, javax.swing.GroupLayout.DEFAULT_SIZE, 104, Short.MAX_VALUE))
                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                    .addComponent(jLabel28)
                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                                    .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                        .addGroup(jPanel13Layout.createSequentialGroup()
                                                            .addComponent(jtf_tiendat10, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                            .addComponent(jLabel29))
                                                        .addComponent(jtf_tiendaarti4, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))
                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                    .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                                        .addComponent(jtf_tiendaarti6)
                                                        .addComponent(jtf_tiendat11, javax.swing.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE))
                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                    .addComponent(jLabel30)
                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 11, Short.MAX_VALUE)
                                                    .addComponent(jtf_tiendat12, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 20, Short.MAX_VALUE)
                                                    .addComponent(jLabel35)
                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                    .addComponent(jtf_tiendat17, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE))
                                                .addGroup(jPanel13Layout.createSequentialGroup()
                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                    .addComponent(jScrollPane16, javax.swing.GroupLayout.DEFAULT_SIZE, 1000, Short.MAX_VALUE)))))
                                    .addContainerGap())
                            );
                            jPanel13Layout.setVerticalGroup(
                                jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanel13Layout.createSequentialGroup()
                                    .addContainerGap()
                                    .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                        .addComponent(jButton5)
                                        .addComponent(jtf_busqueda3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(jtf_pagfin2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(jtf_pagini2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(jLabel26)
                                        .addComponent(jtf_idtienda1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(jtf_idtiendades1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(jcbx_solonegativas4)
                                        .addComponent(jcbx_solonegativas5))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addGroup(jPanel13Layout.createSequentialGroup()
                                            .addComponent(jScrollPane16, javax.swing.GroupLayout.PREFERRED_SIZE, 311, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(18, 18, 18)
                                            .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                .addComponent(jlbl_articulos2)
                                                .addComponent(jtf_tiendaarti2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(jtf_tiendabodega, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(jtf_tienda_piso, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(jtf_tiendat9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(jLabel27)
                                                .addComponent(jtf_tiendat10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(jLabel28)
                                                .addComponent(jtf_tiendat11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(jLabel29)
                                                .addComponent(jtf_tiendat12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(jLabel30)
                                                .addComponent(jtf_tiendat17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(jLabel35))
                                            .addGap(18, 18, 18)
                                            .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                .addComponent(jtf_tiendat18, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(jLabel36)
                                                .addComponent(jtf_tiendaarti3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(jtf_tiendaarti5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(jtf_tiendaarti4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(jtf_tiendaarti6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                        .addGroup(jPanel13Layout.createSequentialGroup()
                                            .addComponent(jScrollPane15, javax.swing.GroupLayout.DEFAULT_SIZE, 442, Short.MAX_VALUE)
                                            .addContainerGap())))
                            );

                            javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12);
                            jPanel12.setLayout(jPanel12Layout);
                            jPanel12Layout.setHorizontalGroup(
                                jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jPanel13, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            );
                            jPanel12Layout.setVerticalGroup(
                                jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanel12Layout.createSequentialGroup()
                                    .addComponent(jPanel13, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addContainerGap())
                            );

                            jTabbedPane1.addTab(resourceMap.getString("jPanel12.TabConstraints.tabTitle"), jPanel12); // NOI18N

                            jPanel14.setName("jPanel14"); // NOI18N

                            jPanel15.setName("jPanel15"); // NOI18N

                            jScrollPane18.setName("jScrollPane18"); // NOI18N

                            jtbl_articulosentiendas3.setModel(this.jtable_modelo_detallealmaaybv);
                            jtbl_articulosentiendas3.setName("jtbl_articulosentiendas3"); // NOI18N
                            jtbl_articulosentiendas3.setRowHeight(26);
                            jtbl_articulosentiendas.addMouseListener(new java.awt.event.MouseAdapter() {
                                public void mouseClicked(java.awt.event.MouseEvent evt) {
                                    jtbl_articulosentiendasMouseClicked(evt);
                                    if(evt.getClickCount() >= 2)
                                    {
                                        dioclickalmacendet(evt);
                                        //System.out.println(" double click" );
                                    }
                                }
                            });
                            jScrollPane18.setViewportView(jtbl_articulosentiendas3);

                            jScrollPane17.setName("jScrollPane17"); // NOI18N

                            jlst_clientesdistribucion2.setModel(this.modelo);
                            jlst_clientesdistribucion2.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
                            jlst_clientesdistribucion2.setName("jlst_clientesdistribucion2"); // NOI18N
                            jlst_clientesdistribucion2.addMouseListener(new java.awt.event.MouseAdapter() {
                                public void mouseClicked(java.awt.event.MouseEvent evt) {
                                    jlst_clientesdistribucion2MouseClicked(evt);
                                    if(evt.getClickCount() >= 2)
                                    {
                                        dioclickdetalmaybv(evt);
                                    }
                                }
                            });
                            jScrollPane17.setViewportView(jlst_clientesdistribucion2);

                            jtf_busqueda4.setText(resourceMap.getString("jtf_busqueda4.text")); // NOI18N
                            jtf_busqueda4.setToolTipText(resourceMap.getString("jtf_busqueda4.toolTipText")); // NOI18N
                            jtf_busqueda4.setName("jtf_busqueda4"); // NOI18N
                            jtf_busqueda4.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jtf_busqueda4ActionPerformed(evt);
                                }
                            });

                            jtf_idtienda2.setEditable(false);
                            jtf_idtienda2.setName("jtf_idtienda2"); // NOI18N

                            jtf_idtiendades2.setEditable(false);
                            jtf_idtiendades2.setName("jtf_idtiendades2"); // NOI18N

                            buttonGroup5.add(jrbtn_aybvigencia);
                            jrbtn_aybvigencia.setText(resourceMap.getString("jrbtn_aybvigencia.text")); // NOI18N
                            jrbtn_aybvigencia.setActionCommand(resourceMap.getString("jrbtn_aybvigencia.actionCommand")); // NOI18N
                            jrbtn_aybvigencia.setName("jrbtn_aybvigencia"); // NOI18N
                            jrbtn_aybvigencia.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jrbtn_aybvigenciaActionPerformed(evt);
                                }
                            });

                            buttonGroup5.add(jrbtn_aybvigencia1);
                            jrbtn_aybvigencia1.setText(resourceMap.getString("jrbtn_aybvigencia1.text")); // NOI18N
                            jrbtn_aybvigencia1.setActionCommand(resourceMap.getString("jrbtn_aybvigencia1.actionCommand")); // NOI18N
                            jrbtn_aybvigencia1.setName("jrbtn_aybvigencia1"); // NOI18N
                            jrbtn_aybvigencia1.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jrbtn_aybvigencia1ActionPerformed(evt);
                                }
                            });

                            buttonGroup5.add(jrbtn_aybvigencia2);
                            jrbtn_aybvigencia2.setText(resourceMap.getString("jrbtn_aybvigencia2.text")); // NOI18N
                            jrbtn_aybvigencia2.setActionCommand(resourceMap.getString("jrbtn_aybvigencia2.actionCommand")); // NOI18N
                            jrbtn_aybvigencia2.setName("jrbtn_aybvigencia2"); // NOI18N
                            jrbtn_aybvigencia2.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jrbtn_aybvigencia2ActionPerformed(evt);
                                }
                            });

                            buttonGroup5.add(jrbtn_aybvigencia3);
                            jrbtn_aybvigencia3.setText(resourceMap.getString("jrbtn_aybvigencia3.text")); // NOI18N
                            jrbtn_aybvigencia3.setActionCommand(resourceMap.getString("jrbtn_aybvigencia3.actionCommand")); // NOI18N
                            jrbtn_aybvigencia3.setName("jrbtn_aybvigencia3"); // NOI18N
                            jrbtn_aybvigencia3.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jrbtn_aybvigencia3ActionPerformed(evt);
                                }
                            });

                            jtf_articulosvigentes.setEditable(false);
                            jtf_articulosvigentes.setText(resourceMap.getString("jtf_articulosvigentes.text")); // NOI18N
                            jtf_articulosvigentes.setName("jtf_articulosvigentes"); // NOI18N

                            jLabel37.setText(resourceMap.getString("jLabel37.text")); // NOI18N
                            jLabel37.setName("jLabel37"); // NOI18N

                            javax.swing.GroupLayout jPanel15Layout = new javax.swing.GroupLayout(jPanel15);
                            jPanel15.setLayout(jPanel15Layout);
                            jPanel15Layout.setHorizontalGroup(
                                jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanel15Layout.createSequentialGroup()
                                    .addComponent(jScrollPane17, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(26, 26, 26)
                                    .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                        .addGroup(jPanel15Layout.createSequentialGroup()
                                            .addComponent(jtf_busqueda4, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(44, 44, 44)
                                            .addComponent(jrbtn_aybvigencia)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jrbtn_aybvigencia1))
                                        .addGroup(jPanel15Layout.createSequentialGroup()
                                            .addComponent(jtf_idtienda2, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jtf_idtiendades2, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(34, 34, 34)
                                            .addComponent(jLabel37, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                            .addComponent(jtf_articulosvigentes)))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jrbtn_aybvigencia2)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jrbtn_aybvigencia3)
                                    .addGap(316, 316, 316))
                                .addComponent(jScrollPane18, javax.swing.GroupLayout.DEFAULT_SIZE, 1115, Short.MAX_VALUE)
                            );
                            jPanel15Layout.setVerticalGroup(
                                jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanel15Layout.createSequentialGroup()
                                    .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(jScrollPane17, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGroup(jPanel15Layout.createSequentialGroup()
                                            .addContainerGap()
                                            .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                .addComponent(jtf_busqueda4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(jrbtn_aybvigencia)
                                                .addComponent(jrbtn_aybvigencia1)
                                                .addComponent(jrbtn_aybvigencia2)
                                                .addComponent(jrbtn_aybvigencia3))
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                .addComponent(jtf_idtienda2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(jtf_idtiendades2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(jtf_articulosvigentes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(jLabel37))))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jScrollPane18, javax.swing.GroupLayout.DEFAULT_SIZE, 415, Short.MAX_VALUE)
                                    .addContainerGap())
                            );

                            javax.swing.GroupLayout jPanel14Layout = new javax.swing.GroupLayout(jPanel14);
                            jPanel14.setLayout(jPanel14Layout);
                            jPanel14Layout.setHorizontalGroup(
                                jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jPanel15, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            );
                            jPanel14Layout.setVerticalGroup(
                                jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jPanel15, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            );

                            jTabbedPane1.addTab(resourceMap.getString("jPanel14.TabConstraints.tabTitle"), jPanel14); // NOI18N

                            jPanel16.setName("jPanel16"); // NOI18N

                            jPanel17.setName("jPanel17"); // NOI18N

                            jButton3.setIcon(resourceMap.getIcon("jButton3.icon")); // NOI18N
                            jButton3.setText(resourceMap.getString("jButton3.text")); // NOI18N
                            jButton3.setName("jButton3"); // NOI18N
                            jButton3.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jButton3ActionPerformed(evt);
                                }
                            });

                            jLabel38.setText(resourceMap.getString("jLabel38.text")); // NOI18N
                            jLabel38.setName("jLabel38"); // NOI18N

                            jdc_fechainicio.setToolTipText(resourceMap.getString("jdc_fechainicio.toolTipText")); // NOI18N
                            jdc_fechainicio.setDateFormatString(resourceMap.getString("jdc_fechainicio.dateFormatString")); // NOI18N
                            jdc_fechainicio.setName("jdc_fechainicio"); // NOI18N
                            jdc_fechainicio.addKeyListener(new java.awt.event.KeyAdapter() {
                                public void keyPressed(java.awt.event.KeyEvent evt) {
                                    jdc_fechainicioKeyPressed(evt);
                                }
                            });

                            jScrollPane19.setName("jScrollPane19"); // NOI18N

                            jtbl_articulosentiendas4.setModel(this.jtable_modelo_detallealmaayb);
                            jtbl_articulosentiendas4.setName("jtbl_articulosentiendas4"); // NOI18N
                            jtbl_articulosentiendas4.setRowHeight(26);
                            jtbl_articulosentiendas.addMouseListener(new java.awt.event.MouseAdapter() {
                                public void mouseClicked(java.awt.event.MouseEvent evt) {
                                    jtbl_articulosentiendasMouseClicked(evt);
                                    if(evt.getClickCount() >= 2)
                                    {
                                        dioclickalmacendet(evt);
                                        //System.out.println(" double click" );
                                    }
                                }
                            });
                            jScrollPane19.setViewportView(jtbl_articulosentiendas4);

                            jtf_idtiendahistorico.setText(resourceMap.getString("jtf_idtiendahistorico.text")); // NOI18N
                            jtf_idtiendahistorico.setName("jtf_idtiendahistorico"); // NOI18N

                            jtf_idtiendades3.setEditable(false);
                            jtf_idtiendades3.setName("jtf_idtiendades3"); // NOI18N

                            jButton6.setText(resourceMap.getString("jButton6.text")); // NOI18N
                            jButton6.setName("jButton6"); // NOI18N
                            jButton6.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jButton6ActionPerformed(evt);
                                }
                            });

                            javax.swing.GroupLayout jPanel17Layout = new javax.swing.GroupLayout(jPanel17);
                            jPanel17.setLayout(jPanel17Layout);
                            jPanel17Layout.setHorizontalGroup(
                                jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanel17Layout.createSequentialGroup()
                                    .addGap(7, 7, 7)
                                    .addComponent(jtf_idtiendahistorico, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jtf_idtiendades3, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jLabel38, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(28, 28, 28)
                                    .addComponent(jdc_fechainicio, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(33, 33, 33)
                                    .addComponent(jButton6)
                                    .addGap(32, 32, 32)
                                    .addComponent(jButton3)
                                    .addContainerGap(302, Short.MAX_VALUE))
                                .addComponent(jScrollPane19, javax.swing.GroupLayout.DEFAULT_SIZE, 1115, Short.MAX_VALUE)
                            );
                            jPanel17Layout.setVerticalGroup(
                                jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanel17Layout.createSequentialGroup()
                                    .addContainerGap()
                                    .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                        .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(jLabel38)
                                            .addComponent(jtf_idtiendahistorico, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(jtf_idtiendades3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addComponent(jdc_fechainicio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(jButton6)
                                            .addComponent(jButton3)))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jScrollPane19, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addContainerGap(62, Short.MAX_VALUE))
                            );

                            javax.swing.GroupLayout jPanel16Layout = new javax.swing.GroupLayout(jPanel16);
                            jPanel16.setLayout(jPanel16Layout);
                            jPanel16Layout.setHorizontalGroup(
                                jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jPanel17, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            );
                            jPanel16Layout.setVerticalGroup(
                                jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jPanel17, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            );

                            jTabbedPane1.addTab(resourceMap.getString("jPanel16.TabConstraints.tabTitle"), jPanel16); // NOI18N

                            jMenuBar1.setName("jMenuBar1"); // NOI18N

                            jMenu1.setText(resourceMap.getString("jMenu1.text")); // NOI18N
                            jMenu1.setName("jMenu1"); // NOI18N

                            jmni_exportarcatalogo.setText(resourceMap.getString("jmni_exportarcatalogo.text")); // NOI18N
                            jmni_exportarcatalogo.setName("jmni_exportarcatalogo"); // NOI18N
                            jmni_exportarcatalogo.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jmni_exportarcatalogoActionPerformed(evt);
                                }
                            });
                            jMenu1.add(jmni_exportarcatalogo);

                            jMenuItem2.setText(resourceMap.getString("jMenuItem2.text")); // NOI18N
                            jMenuItem2.setName("jMenuItem2"); // NOI18N
                            jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jMenuItem2ActionPerformed(evt);
                                }
                            });
                            jMenu1.add(jMenuItem2);

                            jmni_salir.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.ALT_MASK));
                            jmni_salir.setIcon(resourceMap.getIcon("jmni_salir.icon")); // NOI18N
                            jmni_salir.setText(resourceMap.getString("jmni_salir.text")); // NOI18N
                            jmni_salir.setName("jmni_salir"); // NOI18N
                            jmni_salir.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jmni_salirActionPerformed(evt);
                                }
                            });
                            jMenu1.add(jmni_salir);

                            jMenuBar1.add(jMenu1);

                            jMenu3.setText(resourceMap.getString("jMenu3.text")); // NOI18N
                            jMenu3.setName("jMenu3"); // NOI18N

                            jMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F5, 0));
                            jMenuItem1.setIcon(resourceMap.getIcon("jMenuItem1.icon")); // NOI18N
                            jMenuItem1.setText(resourceMap.getString("jMenuItem1.text")); // NOI18N
                            jMenuItem1.setName("jMenuItem1"); // NOI18N
                            jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jMenuItem1ActionPerformed(evt);
                                }
                            });
                            jMenu3.add(jMenuItem1);

                            jmni_escape.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_ESCAPE, 0));
                            jmni_escape.setText(resourceMap.getString("jmni_escape.text")); // NOI18N
                            jmni_escape.setName("jmni_escape"); // NOI18N
                            jmni_escape.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jmni_escapeActionPerformed(evt);
                                }
                            });
                            jMenu3.add(jmni_escape);

                            jmni_edicion.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_B, java.awt.event.InputEvent.ALT_MASK));
                            jmni_edicion.setIcon(resourceMap.getIcon("jmni_edicion.icon")); // NOI18N
                            jmni_edicion.setText(resourceMap.getString("jmni_edicion.text")); // NOI18N
                            jmni_edicion.setName("jmni_edicion"); // NOI18N
                            jMenu3.add(jmni_edicion);

                            jMenuItem3.setText(resourceMap.getString("jMenuItem3.text")); // NOI18N
                            jMenuItem3.setName("jMenuItem3"); // NOI18N
                            jMenuItem3.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jMenuItem3ActionPerformed(evt);
                                }
                            });
                            jMenu3.add(jMenuItem3);

                            jmni_imprimirbrib.setText(resourceMap.getString("jmni_imprimirbrib.text")); // NOI18N
                            jmni_imprimirbrib.setName("jmni_imprimirbrib"); // NOI18N
                            jmni_imprimirbrib.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jmni_imprimirbribActionPerformed(evt);
                                }
                            });
                            jMenu3.add(jmni_imprimirbrib);

                            jMenuItem4.setText(resourceMap.getString("jMenuItem4.text")); // NOI18N
                            jMenuItem4.setName("jMenuItem4"); // NOI18N
                            jMenu3.add(jMenuItem4);

                            jMenuItem5.setText(resourceMap.getString("jMenuItem5.text")); // NOI18N
                            jMenuItem5.setName("jMenuItem5"); // NOI18N
                            jMenuItem5.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jMenuItem5ActionPerformed(evt);
                                }
                            });
                            jMenu3.add(jMenuItem5);

                            jMenuBar1.add(jMenu3);

                            jMenu2.setText(resourceMap.getString("jMenu2.text")); // NOI18N
                            jMenu2.setName("jMenu2"); // NOI18N

                            jmni_crearcomentario.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_U, java.awt.event.InputEvent.ALT_MASK));
                            jmni_crearcomentario.setText(resourceMap.getString("jmni_crearcomentario.text")); // NOI18N
                            jmni_crearcomentario.setName("jmni_crearcomentario"); // NOI18N
                            jmni_crearcomentario.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jmni_crearcomentarioActionPerformed(evt);
                                }
                            });
                            jMenu2.add(jmni_crearcomentario);

                            jMenuBar1.add(jMenu2);

                            setJMenuBar(jMenuBar1);

                            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
                            getContentPane().setLayout(layout);
                            layout.setHorizontalGroup(
                                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                        .addComponent(jTabbedPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 1120, Short.MAX_VALUE)
                                        .addComponent(jPanel6, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addGroup(layout.createSequentialGroup()
                                            .addContainerGap()
                                            .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                                    .addContainerGap())
                            );
                            layout.setVerticalGroup(
                                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(layout.createSequentialGroup()
                                    .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 534, Short.MAX_VALUE))
                            );

                            pack();
                        }// </editor-fold>//GEN-END:initComponents

    private void jtb_almacen_catalogoMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jtb_almacen_catalogoMouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_jtb_almacen_catalogoMouseClicked
    private void jtb_almacen_familiasMouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
    }
   
    private void jmni_salirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_salirActionPerformed
        // TODO add your handling code here:
        // x.cierraConexion();   // TODO add your handling code here:
        if(JOptionPane.showConfirmDialog(null, "Desea Salir?")==0)
              {
            this.dispose();
        }
        
}//GEN-LAST:event_jmni_salirActionPerformed

    private void jmni_crearcomentarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_crearcomentarioActionPerformed
        // TODO add your handling code here:
        this.crearcomentario();
    }//GEN-LAST:event_jmni_crearcomentarioActionPerformed

    private void jrb_bclaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrb_bclaveActionPerformed
        // TODO add your handling code here:

        buscamp=Integer.parseInt(evt.getActionCommand().toString());
    }//GEN-LAST:event_jrb_bclaveActionPerformed

    private void jrb_bdescripActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrb_bdescripActionPerformed
        // TODO add your handling code here:
        buscamp=Integer.parseInt(evt.getActionCommand().toString());
    }//GEN-LAST:event_jrb_bdescripActionPerformed

    private void jtf_busquedaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_busquedaActionPerformed
        // TODO add your handling code here:
        this.jbtn_buscarActionPerformed(evt);
}//GEN-LAST:event_jtf_busquedaActionPerformed

    private void jbtn_buscarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_buscarActionPerformed
        // TODO add your handling code here:
        // this.jtf_busqueda.getText();
         switch (indexactual)
             {
                case 0:
                    if(JOptionPane.showConfirmDialog(null, "Estan Correctos sus Datos?")==0)
                        {
                            this.carga_datos_catalogoarticulos(buscamp,opbuscamp,this.jtf_busqueda.getText().toUpperCase().trim(),1);
                        }
                        else
                        {
                            this.jtf_busqueda.requestFocus();
                        }
                break;
                case 1:
                    if(JOptionPane.showConfirmDialog(null, "Estan Correctos sus Datos?")==0)
                                {
                                    this.carga_datos_catalogoarticulos_almacen(buscamp,opbuscamp,this.jtf_busqueda.getText().toUpperCase().trim(),1);
                                }
                        else
                                {
                                    this.jtf_busqueda.requestFocus();
                                }
                break;
                case 5:
                    if(JOptionPane.showConfirmDialog(null, "Estan Correctos sus Datos?")==0)
                            {
                                this.carga_datos_catalogoarticulos_almacen(buscamp,opbuscamp,this.jtf_busqueda.getText().toUpperCase().trim(),1);
                            }
                        else
                            {
                                this.jtf_busqueda.requestFocus();
                            }
                break;
            }
       


    }//GEN-LAST:event_jbtn_buscarActionPerformed

    private void jrb_bitemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrb_bitemActionPerformed
        // TODO add your handling code here:
        buscamp=Integer.parseInt(evt.getActionCommand().toString());
    }//GEN-LAST:event_jrb_bitemActionPerformed

    private void jrb_bprecioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrb_bprecioActionPerformed
        // TODO add your handling code here:
        buscamp=Integer.parseInt(evt.getActionCommand().toString());
    }//GEN-LAST:event_jrb_bprecioActionPerformed

    private void jrb_obexactoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrb_obexactoActionPerformed
        // TODO add your handling code here:
        opbuscamp=Integer.parseInt(evt.getActionCommand().toString());
}//GEN-LAST:event_jrb_obexactoActionPerformed

    private void jrb_obcomienzaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrb_obcomienzaActionPerformed
        // TODO add your handling code here:
        opbuscamp=Integer.parseInt(evt.getActionCommand().toString());
}//GEN-LAST:event_jrb_obcomienzaActionPerformed

    private void jrb_obaniwayActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrb_obaniwayActionPerformed
        // TODO add your handling code here:
        opbuscamp=Integer.parseInt(evt.getActionCommand().toString());
}//GEN-LAST:event_jrb_obaniwayActionPerformed

    private void jrb_bidfamActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrb_bidfamActionPerformed
        // TODO add your handling code here:
        buscamp=Integer.parseInt(evt.getActionCommand().toString());
}//GEN-LAST:event_jrb_bidfamActionPerformed

    private void jrb_bidsubfamActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrb_bidsubfamActionPerformed
        // TODO add your handling code here:
        buscamp=Integer.parseInt(evt.getActionCommand().toString());
}//GEN-LAST:event_jrb_bidsubfamActionPerformed

    private void jrb_bdessubfamActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrb_bdessubfamActionPerformed
        // TODO add your handling code here:
        buscamp=Integer.parseInt(evt.getActionCommand().toString());
}//GEN-LAST:event_jrb_bdessubfamActionPerformed

    private void jmni_escapeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_escapeActionPerformed
        // TODO add your handling code here:
        this.jmni_salirActionPerformed(evt);
    }//GEN-LAST:event_jmni_escapeActionPerformed

    private void jbtn_salirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_salirActionPerformed
        // TODO add your handling code here:
        //        x.cierraConexion();   // TODO add your handling code here:
        this.dispose();
}//GEN-LAST:event_jbtn_salirActionPerformed

    private void jbtn_movimientosalmacenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_movimientosalmacenActionPerformed
        // TODO add your handling code here:
        com_distri_articulos_movi_inve fcdami=new com_distri_articulos_movi_inve();
        fcdami.pack();
        fcdami.setVisible(true);
}//GEN-LAST:event_jbtn_movimientosalmacenActionPerformed

    private void jtb_inveprogramadosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtb_inveprogramadosActionPerformed
        // TODO add your handling code here:
        com_distri_articulos_invefisico  cdaif = new com_distri_articulos_invefisico();
        cdaif.pack();
        cdaif.setVisible(true);
    }//GEN-LAST:event_jtb_inveprogramadosActionPerformed

    private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
        // TODO add your handling code here:
        if(JOptionPane.showConfirmDialog(null, "Desea Cargar Datos?")==0)
            {
                buscamp=0;
                opbuscamp=0;
                this.carga_datos_catalogoarticulos(buscamp,opbuscamp,this.jtf_busqueda.getText().toUpperCase().trim(),0);
                this.carga_datos_existxfamilia();
                this.carga_datos_existxproveedor();
                this.jtf_busqueda.setText("");
                this.jtf_busqueda.requestFocus();
                this.buttonGroup1.setSelected(jrb_bclave.getModel(), true);
                this.buttonGroup2.setSelected(jrb_obexacto.getModel(), true);
                buscamp=1;
                opbuscamp=1;
            }
    }//GEN-LAST:event_jMenuItem1ActionPerformed
 private void jtb_almacen_controlMouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
}
    private void jTabbedPane1StateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_jTabbedPane1StateChanged
        // TODO add your handling code here:
        indexactual=this.jTabbedPane1.getSelectedIndex();
         if((indexactual==3)&&(yacarguecat==0))
            {
                yacarguecat=1;

                this.carga_datos_catentraalmacen(0, "","");
            }
        if((indexactual==2)&&(yacarguefotos==0))
            {
                yacarguefotos=1;
                this.carga_datos_fotospaginacion(Integer.valueOf(this.jtf_paginaactual.getText().toString()));
            }
        
    }//GEN-LAST:event_jTabbedPane1StateChanged

    private void jmni_exportarcatalogoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_exportarcatalogoActionPerformed
        // TODO add your handling code here:
         if(JOptionPane.showConfirmDialog(null, "Desea Generar Archivo esto Puede Tardar unos Minutos?")==0)
             {
                this.exportar_archivo();
             }
    }//GEN-LAST:event_jmni_exportarcatalogoActionPerformed

    private void jbtn_generorequisicionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_generorequisicionActionPerformed
        // TODO add your handling code here:

        articulos_sie_traspaso_requisicion_catalogo astr=new articulos_sie_traspaso_requisicion_catalogo();
        astr.pack();
        astr.setVisible(true);        // TODO add your handling code here:
}//GEN-LAST:event_jbtn_generorequisicionActionPerformed

    private void jbtn_ImprimirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_ImprimirActionPerformed
        // TODO add your handling code here:
        float filas = this.jtable_modelo_entradaalma.getRowCount() ;
        float paginas = filas /50;
        int ni=0;
        for(ni=0;ni<paginas;ni++) {
            this.imprimir(ni,paginas);
        }
        //this.imprimir(1, 1);
}//GEN-LAST:event_jbtn_ImprimirActionPerformed

    private void jcbx_verexistenciasadActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcbx_verexistenciasadActionPerformed
        // TODO add your handling code here:
         switch (indexactual)
             {
                case 0:
                    if(JOptionPane.showConfirmDialog(null, "Seleccione almacen terminados?")==0)
                        {
                            this.jtf_busqueda.requestFocus();
                        }
                        else
                        {
                            this.jtf_busqueda.requestFocus();
                        }
                break;
                case 1:
                    if(JOptionPane.showConfirmDialog(null, "Desea ver existencias?")==0)
                        {
                            this.carga_datos_catalogoarticulos_almacen(0,0,"",1);
                        }
                        else
                        {
                            this.jtf_busqueda.requestFocus();
                        }
                break;
            }
    }//GEN-LAST:event_jcbx_verexistenciasadActionPerformed

    private void jchbx_agregarregistrosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jchbx_agregarregistrosActionPerformed
        // TODO add your handling code here:
       int totalfilas=this.jtable_modelo_alm_update.getRowCount(),i=0;
       //genero los totales por tienda
         if(JOptionPane.showConfirmDialog(null, "Desea Agregar Todos?")==0)
              {
               for(i=0;i<totalfilas;i++)
                   {
                        jtable_modelo_alm_updatereplace.addRow(new Object[]{this.jtable_modelo_alm_update.getValueAt(i, 0).toString(),this.jtable_modelo_alm_update.getValueAt(i, 1).toString(),this.jtable_modelo_alm_update.getValueAt(i, 2).toString(),this.jtable_modelo_alm_update.getValueAt(i, 3).toString(),this.jtf_textoactualizar.getText().toUpperCase().trim(),this.jtable_modelo_alm_update.getValueAt(i, 5).toString(),this.jtable_modelo_alm_update.getValueAt(i, 6).toString(),this.jtable_modelo_alm_update.getValueAt(i, 7).toString(),this.jtable_modelo_alm_update.getValueAt(i, 8).toString(),this.jtable_modelo_alm_update.getValueAt(i, 9)+""});
                    }
             }
    }//GEN-LAST:event_jchbx_agregarregistrosActionPerformed

    private void jbtn_cambiosaplicarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_cambiosaplicarActionPerformed
        // TODO add your handling code here:
        if(JOptionPane.showConfirmDialog(null, "Desea Aplicar Cambios?")==0)
                {
                        this.datos_aplicarcambios(campupdate);
                }

    }//GEN-LAST:event_jbtn_cambiosaplicarActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        // TODO add your handling code here:
         String arreglo_importa[]=this.jta_archivo.getText().split("\n");
            String arreglo_codigo[]=null;
            System.out.println("Estos tiene archivo:"+arreglo_importa.length);
            while(jtable_modelo_alm_update.getRowCount()>0)jtable_modelo_alm_update.removeRow(0);
             for (int i=0;i<arreglo_importa.length;i++)
             {
                arreglo_codigo=arreglo_importa[i].split("\t");
                this.carga_datos_catalogoarticulos_almacen(1,1,arreglo_codigo[0].toUpperCase().trim(),0);
             }
            this.jta_archivo.setText("");
    }//GEN-LAST:event_jButton1ActionPerformed

    private void jrb_lugaralmacenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrb_lugaralmacenActionPerformed
        // TODO add your handling code here:
             buscamp=Integer.parseInt(evt.getActionCommand().toString());
}//GEN-LAST:event_jrb_lugaralmacenActionPerformed

    private void jbtn_anteriorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_anteriorActionPerformed
        // TODO add your handling code here:
        this.jtf_paginaactual.setText(String.valueOf(Integer.valueOf(this.jtf_paginaactual.getText().toString())-1));
        System.out.println("Esta es la pagina que mando"+this.jtf_paginaactual.getText());
        this.carga_datos_fotospaginacion(Integer.valueOf(this.jtf_paginaactual.getText().toString()));
}//GEN-LAST:event_jbtn_anteriorActionPerformed

    private void jbtn_siguienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_siguienteActionPerformed
        // TODO add your handling code here:
        this.jtf_paginaactual.setText(String.valueOf(Integer.valueOf(this.jtf_paginaactual.getText().toString())+1));
        System.out.println("Esta es la pagina que mando"+this.jtf_paginaactual.getText());
        this.carga_datos_fotospaginacion(Integer.valueOf(this.jtf_paginaactual.getText().toString()));
    }//GEN-LAST:event_jbtn_siguienteActionPerformed

    private void jtf_paginaactualActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_paginaactualActionPerformed
        // TODO add your handling code here:
         this.carga_datos_fotospaginacion(Integer.valueOf(this.jtf_paginaactual.getText().toString()));
    }//GEN-LAST:event_jtf_paginaactualActionPerformed

    private void jtf_fotosartxpagActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_fotosartxpagActionPerformed
        // TODO add your handling code here:
         this.carga_datos_fotospaginacion(Integer.valueOf(this.jtf_paginaactual.getText().toString()));
    }//GEN-LAST:event_jtf_fotosartxpagActionPerformed

    private void jbtn_generaetiActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_generaetiActionPerformed
        // TODO add your handling code here:
        this.crearetiqueta();
}//GEN-LAST:event_jbtn_generaetiActionPerformed

    private void jtf_cantidadetiActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_cantidadetiActionPerformed
        // TODO add your handling code here:
        for(int ii=0;ii<this.jtable_modelo_almacen.getRowCount();ii++) {
            this.jtable_modelo_almacen.setValueAt(this.jtf_cantidadeti.getText().trim(), ii, 9);
        }
}//GEN-LAST:event_jtf_cantidadetiActionPerformed

    private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed
        // TODO add your handling code here:
          if(JOptionPane.showConfirmDialog(null, "Desea Generar Archivo esto Puede Tardar unos Minutos?")==0)
             {

                this.exportar_archivoxtienda();
             }
    }//GEN-LAST:event_jMenuItem2ActionPerformed

    private void jtf_paginiActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_paginiActionPerformed
        // TODO add your handling code here:
        this.jtf_pagfin.selectAll();
        this.jtf_pagfin.requestFocus();
}//GEN-LAST:event_jtf_paginiActionPerformed

    private void jtf_pagfinActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_pagfinActionPerformed
        // TODO add your handling code here:
        this.jButton2ActionPerformed(evt);
}//GEN-LAST:event_jtf_pagfinActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        // TODO add your handling code here:
        float filas = this.jtable_modelo_detallealma.getRowCount() ;
        float paginas = filas /50;
        int ni=0;
        if((this.jtf_pagini.getText().equals("-1")) && (this.jtf_pagini.getText().equals("-1")))
        {
            if(JOptionPane.showConfirmDialog(null, "Desea Imprimir Todas Las Paginas?")==0)
            {
            for(ni=0;ni<paginas;ni++)
                 {
                     this.imprimirinventario(ni,paginas);
                     System.out.println("Imprimir todo");
                 }
             }
        }
        else
        {
            for(ni=(Integer.valueOf(this.jtf_pagini.getText())-1);ni<Integer.valueOf(this.jtf_pagfin.getText());ni++)
             {
                 this.imprimirinventario(ni,paginas);
                System.out.println("Imprimir lo que quiero");
             }
        }
    }//GEN-LAST:event_jButton2ActionPerformed

    private void jtf_busqueda1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_busqueda1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jtf_busqueda1ActionPerformed

    private void jcbx_solonegativasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcbx_solonegativasActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jcbx_solonegativasActionPerformed

    private void jcbx_solonegativas2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcbx_solonegativas2ActionPerformed
        // TODO add your handling code here:
        if(JOptionPane.showConfirmDialog(null, "Desea Ver Articulos de Rebaja?")==0)
            {
                    this.carga_datos_detallealmacenrebaja(10, this.jtf_idtienda.getText());
                    this.carga_datos_detallealmacenrebajabod(12, this.jtf_idtienda.getText());
            }
    }//GEN-LAST:event_jcbx_solonegativas2ActionPerformed

    private void jrbt_tiendaidActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbt_tiendaidActionPerformed
        // TODO add your handling code here:
        ordenamiento=Integer.parseInt(evt.getActionCommand().toString());
    }//GEN-LAST:event_jrbt_tiendaidActionPerformed

    private void jrbtn_tiendaclaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbtn_tiendaclaveActionPerformed
        // TODO add your handling code here:
        ordenamiento=Integer.parseInt(evt.getActionCommand().toString());
    }//GEN-LAST:event_jrbtn_tiendaclaveActionPerformed

    private void jMenuItem3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem3ActionPerformed
        // TODO add your handling code here:
        float filas = this.jtable_modelo_detallealma.getRowCount() ;
        float paginas = filas /50;
        int ni=0;
        if((this.jtf_pagini.getText().equals("-1")) && (this.jtf_pagini.getText().equals("-1")))
        {
            if(JOptionPane.showConfirmDialog(null, "Desea Imprimir Todas Las Paginas?")==0)
            {
            for(ni=0;ni<paginas;ni++)
                 {
                     this.imprimirinventariosc(ni,paginas);
                     System.out.println("Imprimir todo");
                 }
             }
        }
        else
        {
            for(ni=(Integer.valueOf(this.jtf_pagini.getText())-1);ni<Integer.valueOf(this.jtf_pagfin.getText());ni++)
             {
                 this.imprimirinventariosc(ni,paginas);
                System.out.println("Imprimir lo que quiero");
             }
        }
    }//GEN-LAST:event_jMenuItem3ActionPerformed

    private void jtf_busqueda2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_busqueda2ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jtf_busqueda2ActionPerformed

    private void jtf_pagini1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_pagini1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jtf_pagini1ActionPerformed

    private void jtf_pagfin1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_pagfin1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jtf_pagfin1ActionPerformed

    private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
        // TODO add your handling code here:
               float filas = this.jtable_modelo_detallealmab.getRowCount() ;
        float paginas = filas /50;
        int ni=0;
        if((this.jtf_pagini1.getText().equals("-1")) && (this.jtf_pagini1.getText().equals("-1")))
        {
            if(JOptionPane.showConfirmDialog(null, "Desea Imprimir Todas Las Paginas?")==0)
            {
            for(ni=0;ni<paginas;ni++)
                 {
                     this.imprimirinventariob(ni,paginas);
                     System.out.println("Imprimir todo");
                 }
             }
        }
        else
        {
            for(ni=(Integer.valueOf(this.jtf_pagini1.getText())-1);ni<Integer.valueOf(this.jtf_pagfin1.getText());ni++)
             {
                 this.imprimirinventariob(ni,paginas);
                System.out.println("Imprimir lo que quiero");
             }
        }
    }//GEN-LAST:event_jButton4ActionPerformed

    private void jmni_imprimirbribActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_imprimirbribActionPerformed
        // TODO add your handling code here:
                      float filas = this.jtable_modelo_detallealmab.getRowCount() ;
        float paginas = filas /50;
        int ni=0;
        if((this.jtf_pagini1.getText().equals("-1")) && (this.jtf_pagini1.getText().equals("-1")))
        {
            if(JOptionPane.showConfirmDialog(null, "Desea Imprimir Todas Las Paginas?")==0)
            {
            for(ni=0;ni<paginas;ni++)
                 {
                     this.imprimirinventariobsc(ni,paginas);
                     System.out.println("Imprimir todo");
                 }
             }
        }
        else
        {
            for(ni=(Integer.valueOf(this.jtf_pagini1.getText())-1);ni<Integer.valueOf(this.jtf_pagfin1.getText());ni++)
             {
                 this.imprimirinventariobsc(ni,paginas);
                System.out.println("Imprimir lo que quiero");
             }
        }
    }//GEN-LAST:event_jmni_imprimirbribActionPerformed

    private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed
        // TODO add your handling code here:
        float filas = this.jtable_modelo_detallealmaayb.getRowCount() ;
        float paginas = filas /50;
        int ni=0;

        if((this.jtf_pagini2.getText().equals("-1")) && (this.jtf_pagini2.getText().equals("-1")))
        {
            if(JOptionPane.showConfirmDialog(null, "Desea Imprimir Todas Las Paginas?")==0)
            {
            for(ni=0;ni<paginas;ni++)
                 {
                     this.imprimirinventariogen(ni,paginas);
                     System.out.println("Imprimir todo");
                 }
             }
        }
        else
        {
            for(ni=(Integer.valueOf(this.jtf_pagini2.getText())-1);ni<Integer.valueOf(this.jtf_pagfin2.getText());ni++)
             {
                 this.imprimirinventariogen(ni,paginas);
                System.out.println("Imprimir lo que quiero");
             }
        }
    }//GEN-LAST:event_jButton5ActionPerformed

    private void jtf_busqueda3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_busqueda3ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jtf_busqueda3ActionPerformed

    private void jtf_pagini2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_pagini2ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jtf_pagini2ActionPerformed

    private void jtf_pagfin2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_pagfin2ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jtf_pagfin2ActionPerformed

    private void jcbx_solonegativas4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcbx_solonegativas4ActionPerformed
        // TODO add your handling code here:
         this.carga_datos_detallealmacenayb(18, this.jtf_idtienda1.getText(),ordenamiento);
    }//GEN-LAST:event_jcbx_solonegativas4ActionPerformed

    private void jbtn_agregarterminadoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_agregarterminadoActionPerformed
        // TODO add your handling code here:
        com_distri_articulos_almacen_detalle fcdaad=new com_distri_articulos_almacen_detalle(2,"");
        fcdaad.pack();
        fcdaad.setVisible(true);
}//GEN-LAST:event_jbtn_agregarterminadoActionPerformed

    private void jRadioButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton1ActionPerformed
        // TODO add your handling code here:
         campupdate=Integer.parseInt(evt.getActionCommand().toString());
    }//GEN-LAST:event_jRadioButton1ActionPerformed

    private void jRadioButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton2ActionPerformed
        // TODO add your handling code here:
        campupdate=Integer.parseInt(evt.getActionCommand().toString());
    }//GEN-LAST:event_jRadioButton2ActionPerformed

    private void jcbx_solonegativas5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcbx_solonegativas5ActionPerformed
        // TODO add your handling code here:
          if(JOptionPane.showConfirmDialog(null, "Desea Ver Articulos sin foto?")==0)
            {

                    this.carga_datos_detallealmacenayb(20, this.jtf_idtienda1.getText(),ordenamiento);


            }

    }//GEN-LAST:event_jcbx_solonegativas5ActionPerformed

    private void jtf_busqueda4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_busqueda4ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jtf_busqueda4ActionPerformed

    private void jrbtn_aybvigenciaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbtn_aybvigenciaActionPerformed
        // TODO add your handling code here:
         buscampv=Integer.parseInt(evt.getActionCommand().toString());
    }//GEN-LAST:event_jrbtn_aybvigenciaActionPerformed

    private void jrbtn_aybvigencia1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbtn_aybvigencia1ActionPerformed
        // TODO add your handling code here:
        buscampv=Integer.parseInt(evt.getActionCommand().toString());
    }//GEN-LAST:event_jrbtn_aybvigencia1ActionPerformed

    private void jrbtn_aybvigencia2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbtn_aybvigencia2ActionPerformed
        // TODO add your handling code here:
        buscampv=Integer.parseInt(evt.getActionCommand().toString());
    }//GEN-LAST:event_jrbtn_aybvigencia2ActionPerformed

    private void jrbtn_aybvigencia3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbtn_aybvigencia3ActionPerformed
        // TODO add your handling code here:
        buscampv=Integer.parseInt(evt.getActionCommand().toString());
    }//GEN-LAST:event_jrbtn_aybvigencia3ActionPerformed

    private void jdc_fechainicioKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jdc_fechainicioKeyPressed
        // TODO add your handling code here:
}//GEN-LAST:event_jdc_fechainicioKeyPressed

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
        // TODO add your handling code here:
         if(JOptionPane.showConfirmDialog(null, "Desea Ver Articulos de este Almacen?")==0)
            {
                SimpleDateFormat formato = new SimpleDateFormat("yyyy-MM-dd");
                String pFechai = formato.format(jdc_fechainicio.getDate());//fecha final de reporte

                    this.carga_datos_detallealmacenaybhistorico(1, this.jtf_idtiendahistorico.getText(),ordenamiento,pFechai);


            }
    }//GEN-LAST:event_jButton3ActionPerformed

    private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed
        // TODO add your handling code here:
        if(JOptionPane.showConfirmDialog(null, "Desea Ver Articulos de este Almacen?")==0)
            {
                SimpleDateFormat formato = new SimpleDateFormat("yyyy-MM-dd");
                String pFechai = formato.format(jdc_fechainicio.getDate());//fecha final de reporte

                    this.carga_datos_detallealmacenaybhistorico(2, this.jtf_idtiendahistorico.getText(),ordenamiento,pFechai);
            }
    }//GEN-LAST:event_jButton6ActionPerformed

    private void jMenuItem5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem5ActionPerformed
        // TODO add your handling code here:
        this.distribucionfotos();
    }//GEN-LAST:event_jMenuItem5ActionPerformed

    private void jrbt_tiendaid1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbt_tiendaid1ActionPerformed
        // TODO add your handling code here:
        ordenamiento=Integer.parseInt(evt.getActionCommand().toString());
    }//GEN-LAST:event_jrbt_tiendaid1ActionPerformed
    private void jtb_almacen_actualizaMouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
    }
    private void jbt_catalogoalmacenMouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
    }
    private void jlst_clientesdistribucion2MouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
    }
private void jtb_almacen_proveedorMouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:

    }
 
private void crearcomentario()
          {
        String retorno="";
        String comentario=JOptionPane.showInputDialog("Ingresa Tu Sugerencia o Comentario:");
        if (comentario.length()>0)
        {
            try
            {
                rs = x.sieuno_executediversos("select * from x1distribucion_bitacorainserta('"+comentario+"', 'Almacen Distribucion');");
               while (rs.next())
                   {
                         retorno=rs.getString(1);
                   }
             }
            catch(Exception e)
            {
                System.out.println(e.getMessage());
            }
            if (retorno.equals("1"))
              {
                JOptionPane.showMessageDialog(null,"Gracias Tu comentario ha sido guardado", "Sistema Integral Comentarios",1);

              }

      }
    }




    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                 new com_distri_articulos_almacen();
                //dialog.addWindowListener(new java.awt.event.WindowAdapter() {
                  //  public void windowClosing(java.awt.event.WindowEvent e) {
                  //      System.exit(0);
                   // }
                //});
               // dialog.setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.ButtonGroup buttonGroup2;
    private javax.swing.ButtonGroup buttonGroup3;
    private javax.swing.ButtonGroup buttonGroup4;
    private javax.swing.ButtonGroup buttonGroup5;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    private javax.swing.JButton jButton5;
    private javax.swing.JButton jButton6;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel32;
    private javax.swing.JLabel jLabel33;
    private javax.swing.JLabel jLabel34;
    private javax.swing.JLabel jLabel35;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel38;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenu jMenu3;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenuItem2;
    private javax.swing.JMenuItem jMenuItem3;
    private javax.swing.JMenuItem jMenuItem4;
    private javax.swing.JMenuItem jMenuItem5;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel13;
    private javax.swing.JPanel jPanel14;
    private javax.swing.JPanel jPanel15;
    private javax.swing.JPanel jPanel16;
    private javax.swing.JPanel jPanel17;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JRadioButton jRadioButton1;
    private javax.swing.JRadioButton jRadioButton2;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane10;
    private javax.swing.JScrollPane jScrollPane11;
    private javax.swing.JScrollPane jScrollPane12;
    private javax.swing.JScrollPane jScrollPane13;
    private javax.swing.JScrollPane jScrollPane14;
    private javax.swing.JScrollPane jScrollPane15;
    private javax.swing.JScrollPane jScrollPane16;
    private javax.swing.JScrollPane jScrollPane17;
    private javax.swing.JScrollPane jScrollPane18;
    private javax.swing.JScrollPane jScrollPane19;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane6;
    private javax.swing.JScrollPane jScrollPane7;
    private javax.swing.JScrollPane jScrollPane8;
    private javax.swing.JScrollPane jScrollPane9;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTable jbt_catalogoalmacen;
    private javax.swing.JTable jbt_catalogoalmacendetalle;
    private javax.swing.JButton jbtn_Imprimir;
    private javax.swing.JButton jbtn_agregarterminado;
    private javax.swing.JButton jbtn_anterior;
    private javax.swing.JButton jbtn_buscar;
    private javax.swing.JButton jbtn_cambiosaplicar;
    private javax.swing.JButton jbtn_generaeti;
    private javax.swing.JButton jbtn_generorequisicion;
    private javax.swing.JButton jbtn_movimientosalmacen;
    private javax.swing.JButton jbtn_salir;
    private javax.swing.JButton jbtn_siguiente;
    private javax.swing.JCheckBox jcbx_solonegativas;
    private javax.swing.JCheckBox jcbx_solonegativas1;
    private javax.swing.JCheckBox jcbx_solonegativas2;
    private javax.swing.JCheckBox jcbx_solonegativas4;
    private javax.swing.JCheckBox jcbx_solonegativas5;
    private javax.swing.JCheckBox jcbx_verexistenciasad;
    private javax.swing.JCheckBox jchbx_agregarregistros;
    private com.toedter.calendar.JDateChooser jdc_fechainicio;
    private javax.swing.JEditorPane jep_articuloimagen;
    private javax.swing.JEditorPane jepn_fotos;
    private javax.swing.JLabel jlbl_articulos;
    private javax.swing.JLabel jlbl_articulos1;
    private javax.swing.JLabel jlbl_articulos2;
    private javax.swing.JLabel jlbl_articulos3;
    private javax.swing.JLabel jlbl_cantidadregistros;
    private javax.swing.JLabel jlbl_cantidadregistros1;
    private javax.swing.JLabel jlbl_paginas;
    private javax.swing.JLabel jlbl_textobuscado;
    private javax.swing.JList jlst_clientesdistribucion;
    private javax.swing.JList jlst_clientesdistribucion1;
    private javax.swing.JList jlst_clientesdistribucion2;
    private javax.swing.JMenuItem jmni_crearcomentario;
    private javax.swing.JMenuItem jmni_edicion;
    private javax.swing.JMenuItem jmni_escape;
    private javax.swing.JMenuItem jmni_exportarcatalogo;
    private javax.swing.JMenuItem jmni_imprimirbrib;
    private javax.swing.JMenuItem jmni_salir;
    private javax.swing.JRadioButton jrb_bclave;
    private javax.swing.JRadioButton jrb_bdescrip;
    private javax.swing.JRadioButton jrb_bdessubfam;
    private javax.swing.JRadioButton jrb_bidfam;
    private javax.swing.JRadioButton jrb_bidsubfam;
    private javax.swing.JRadioButton jrb_bitem;
    private javax.swing.JRadioButton jrb_bprecio;
    private javax.swing.JRadioButton jrb_lugaralmacen;
    private javax.swing.JRadioButton jrb_obaniway;
    private javax.swing.JRadioButton jrb_obcomienza;
    private javax.swing.JRadioButton jrb_obexacto;
    private javax.swing.JRadioButton jrbt_tiendaid;
    private javax.swing.JRadioButton jrbt_tiendaid1;
    private javax.swing.JRadioButton jrbtn_aybvigencia;
    private javax.swing.JRadioButton jrbtn_aybvigencia1;
    private javax.swing.JRadioButton jrbtn_aybvigencia2;
    private javax.swing.JRadioButton jrbtn_aybvigencia3;
    private javax.swing.JRadioButton jrbtn_tiendaclave;
    private javax.swing.JEditorPane jta_archivo;
    private javax.swing.JTable jtb_almacen_actualiza;
    private javax.swing.JTable jtb_almacen_catalogo;
    private javax.swing.JTable jtb_almacen_control;
    private javax.swing.JTable jtb_almacen_familias;
    private javax.swing.JTable jtb_almacen_proveedor;
    private javax.swing.JTable jtb_almacen_replace;
    private javax.swing.JButton jtb_inveprogramados;
    private javax.swing.JTable jtbl_articulosentiendas;
    private javax.swing.JTable jtbl_articulosentiendas1;
    private javax.swing.JTable jtbl_articulosentiendas2;
    private javax.swing.JTable jtbl_articulosentiendas3;
    private javax.swing.JTable jtbl_articulosentiendas4;
    private javax.swing.JTextField jtf_articulosrebajados;
    private javax.swing.JTextField jtf_articulosrebajados1;
    private javax.swing.JTextField jtf_articulosrebajados2;
    private javax.swing.JTextField jtf_articulosrebajados3;
    private javax.swing.JTextField jtf_articulosrebajados4;
    private javax.swing.JTextField jtf_articulosrebajados5;
    private javax.swing.JTextField jtf_articulosrebajados6;
    private javax.swing.JTextField jtf_articulosrebajados7;
    private javax.swing.JTextField jtf_articulosvigentes;
    private javax.swing.JTextField jtf_busqueda;
    private javax.swing.JTextField jtf_busqueda1;
    private javax.swing.JTextField jtf_busqueda2;
    private javax.swing.JTextField jtf_busqueda3;
    private javax.swing.JTextField jtf_busqueda4;
    private javax.swing.JTextField jtf_cantidadeti;
    private javax.swing.JTextField jtf_fotosartxpag;
    private javax.swing.JTextField jtf_idtienda;
    private javax.swing.JTextField jtf_idtienda1;
    private javax.swing.JTextField jtf_idtienda2;
    private javax.swing.JTextField jtf_idtiendades;
    private javax.swing.JTextField jtf_idtiendades1;
    private javax.swing.JTextField jtf_idtiendades2;
    private javax.swing.JTextField jtf_idtiendades3;
    private javax.swing.JTextField jtf_idtiendahistorico;
    private javax.swing.JTextField jtf_movalmacen;
    private javax.swing.JTextField jtf_movdescribe;
    private javax.swing.JTextField jtf_movfecha;
    private javax.swing.JTextField jtf_movidfolio;
    private javax.swing.JTextField jtf_pagfin;
    private javax.swing.JTextField jtf_pagfin1;
    private javax.swing.JTextField jtf_pagfin2;
    private javax.swing.JTextField jtf_paginaactual;
    private javax.swing.JTextField jtf_pagini;
    private javax.swing.JTextField jtf_pagini1;
    private javax.swing.JTextField jtf_pagini2;
    private javax.swing.JTextField jtf_piezasmov;
    private javax.swing.JTextField jtf_textoactualizar;
    private javax.swing.JTextField jtf_tienda_piso;
    private javax.swing.JTextField jtf_tiendaarti;
    private javax.swing.JTextField jtf_tiendaarti1;
    private javax.swing.JTextField jtf_tiendaarti2;
    private javax.swing.JTextField jtf_tiendaarti3;
    private javax.swing.JTextField jtf_tiendaarti4;
    private javax.swing.JTextField jtf_tiendaarti5;
    private javax.swing.JTextField jtf_tiendaarti6;
    private javax.swing.JTextField jtf_tiendabodega;
    private javax.swing.JTextField jtf_tiendat1;
    private javax.swing.JTextField jtf_tiendat10;
    private javax.swing.JTextField jtf_tiendat11;
    private javax.swing.JTextField jtf_tiendat12;
    private javax.swing.JTextField jtf_tiendat13;
    private javax.swing.JTextField jtf_tiendat14;
    private javax.swing.JTextField jtf_tiendat15;
    private javax.swing.JTextField jtf_tiendat16;
    private javax.swing.JTextField jtf_tiendat17;
    private javax.swing.JTextField jtf_tiendat18;
    private javax.swing.JTextField jtf_tiendat2;
    private javax.swing.JTextField jtf_tiendat3;
    private javax.swing.JTextField jtf_tiendat4;
    private javax.swing.JTextField jtf_tiendat5;
    private javax.swing.JTextField jtf_tiendat6;
    private javax.swing.JTextField jtf_tiendat7;
    private javax.swing.JTextField jtf_tiendat8;
    private javax.swing.JTextField jtf_tiendat9;
    private javax.swing.JTextField jtf_unidad;
    // End of variables declaration//GEN-END:variables
private com_distri_folios_imprimir objimpresora;
private articulos_sie_invefisico_imprimir objimpresora2;

}
